From 68abc78a9a543697d8f176775a052c1d70e371a4 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Fri, 2 Nov 2018 15:01:05 -0600 Subject: added some basic user models and tests --- apps/accounts/tests/test_models.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 apps/accounts/tests/test_models.py (limited to 'apps/accounts/tests/test_models.py') diff --git a/apps/accounts/tests/test_models.py b/apps/accounts/tests/test_models.py new file mode 100644 index 0000000..48cc976 --- /dev/null +++ b/apps/accounts/tests/test_models.py @@ -0,0 +1,12 @@ +from django.test import TestCase +from mixer.backend.django import mixer + +from accounts.models import User, UserProfile + + +class UserProfileModelTest(TestCase): + + def test_string_representation(self): + user = mixer.blend(User, username='test') + profile = UserProfile(user=user) + self.assertEqual(str(profile), str(user.username)) -- cgit v1.2.3-70-g09d2