diff options
| author | 2019-08-15 20:31:19 +0200 | |
|---|---|---|
| committer | 2019-08-15 20:31:19 +0200 | |
| commit | f86a8143256575c204f218b7a4b3e6ad7203052d (patch) | |
| tree | dea41c0b83c5f8ecdffc54a96f3eaf121ced8dfc | |
| parent | Adding missing docstring in public method (diff) | |
Making User.top_role test only query once
| -rw-r--r-- | pydis_site/apps/api/tests/test_users.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pydis_site/apps/api/tests/test_users.py b/pydis_site/apps/api/tests/test_users.py index 44ce481e..1afba40d 100644 --- a/pydis_site/apps/api/tests/test_users.py +++ b/pydis_site/apps/api/tests/test_users.py @@ -145,5 +145,6 @@ class CreationTests(APISubdomainTestCase): def test_correct_top_role_property(self): """Tests if the top_role property returns the correct role.""" - self.assertIsInstance(self.role_test_user.top_role, Role) - self.assertEqual(self.role_test_user.top_role.id, self.role_top.id) + top_role = self.role_test_user.top_role + self.assertIsInstance(top_role, Role) + self.assertEqual(top_role.id, self.role_top.id) |