blob: 48cc976777d911e777050fe2217117dc10fb1a91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
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))
|