diff options
Diffstat (limited to 'pydis_site')
| -rw-r--r-- | pydis_site/apps/api/tests/test_users.py | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/pydis_site/apps/api/tests/test_users.py b/pydis_site/apps/api/tests/test_users.py index 4c0f6e27..a02fce8a 100644 --- a/pydis_site/apps/api/tests/test_users.py +++ b/pydis_site/apps/api/tests/test_users.py @@ -143,7 +143,7 @@ class UserModelTests(APISubdomainTestCase):          cls.user_with_roles = User.objects.create(              id=1,              name="Test User with two roles", -            discriminator=1111, +            discriminator=1,              in_guild=True,          )          cls.user_with_roles.roles.extend([cls.role_bottom.id, cls.role_top.id]) @@ -166,3 +166,7 @@ class UserModelTests(APISubdomainTestCase):          top_role = self.user_without_roles.top_role          self.assertIsInstance(top_role, Role)          self.assertEqual(top_role.id, self.developers_role.id) + +    def test_correct_username_formatting(self): +        """Tests the username property with both name and discriminator formatted together.""" +        self.assertEqual(self.user_with_roles.username, "Test User with two roles#0001") | 
