new apps.lyric.urls, .tests.test_views files to test & execute mock email sending; apps.lyric.models, .tests.test_models now test & execute unique token autogen to integrate w. magic link login using only email; core.settings updated w. new urlpatterns to accommodate
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from django.contrib import auth
|
||||
from django.test import TestCase
|
||||
from ..models import User
|
||||
from ..models import Token, User
|
||||
|
||||
class UserModelTest(TestCase):
|
||||
def test_model_is_configured_for_django_auth(self):
|
||||
@@ -13,3 +13,9 @@ class UserModelTest(TestCase):
|
||||
def test_id_is_primary_key(self):
|
||||
user = User(id="123")
|
||||
self.assertEqual(user.pk, "123")
|
||||
|
||||
class TokenModelTest(TestCase):
|
||||
def test_links_user_with_autogen_uid(self):
|
||||
token1 = Token.objects.create(id="123")
|
||||
token2 = Token.objects.create(id="124")
|
||||
self.assertNotEqual(token1.uid, token2.uid)
|
||||
|
||||
Reference in New Issue
Block a user