From 5bd25bb107f969663793401f6aa3259fc46125d9 Mon Sep 17 00:00:00 2001 From: jchristgit Date: Sat, 23 Nov 2024 20:36:18 +0100 Subject: Remove discriminator from bot logs view (#1424) When a user does not have a discriminator, do not display it anymore. Behaviour for users with discriminators (for historic infractions is unchanged). --- pydis_site/apps/api/tests/test_models.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pydis_site/apps/api/tests') diff --git a/pydis_site/apps/api/tests/test_models.py b/pydis_site/apps/api/tests/test_models.py index 456ac408..0804384c 100644 --- a/pydis_site/apps/api/tests/test_models.py +++ b/pydis_site/apps/api/tests/test_models.py @@ -187,3 +187,9 @@ class StringDunderMethodTests(SimpleTestCase): "Nomination of Hemlock's Cat#7777 (active)", str(self.nomination) ) + + +class UserTests(SimpleTestCase): + def test_str_without_discriminator(self) -> None: + user = User(name="lemonfannumber1") + self.assertEqual(str(user), "lemonfannumber1") -- cgit v1.2.3