added username (models.CharField) & searchable (models.BooleanField) to User model in lyric app; new ITs confirm functionality here; dashboard views now ensure that sharing a list w. an email address (as opposed to a username) neither confirms nor denies whether that email address has a registered account (ITs green)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Disco DeDisco
2026-03-01 21:19:12 -05:00
parent 168c877970
commit 4aa63c74e2
5 changed files with 53 additions and 1 deletions

View File

@@ -18,6 +18,16 @@ class UserModelTest(TestCase):
user = User(id="123")
self.assertEqual(user.pk, "123")
def test_user_can_have_a_username(self):
user = User.objects.create(email="a@b.cde")
user.username = "stardust"
user.save()
self.assertEqual(User.objects.get(pk=user.pk).username, "stardust")
def test_searchable_defaults_to_false(self):
user = User.objects.create(email="a@b.cde")
self.assertFalse(user.searchable)
class TokenModelTest(TestCase):
def test_links_user_with_autogen_uid(self):
token1 = Token.objects.create(email="a@b.cde")