blob: f9b33f64c738b0bc5b3260076f101ee7aa3bc012 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
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')
user.save()
profile = UserProfile.objects.get(user=user)
self.assertEqual(str(profile), str(user.username))
|