diff --git a/rest-app/smartpicasso/app/user/__pycache__/models.cpython-38.pyc b/rest-app/smartpicasso/app/user/__pycache__/models.cpython-38.pyc index fe0252a..b3aaace 100644 Binary files a/rest-app/smartpicasso/app/user/__pycache__/models.cpython-38.pyc and b/rest-app/smartpicasso/app/user/__pycache__/models.cpython-38.pyc differ diff --git a/rest-app/smartpicasso/app/user/tests.py b/rest-app/smartpicasso/app/user/tests.py index 5e8f2b9..a33d137 100644 --- a/rest-app/smartpicasso/app/user/tests.py +++ b/rest-app/smartpicasso/app/user/tests.py @@ -1,7 +1,9 @@ -from rest_framework.test import APITestCase, APIClient +from django.test import TestCase from django.urls import reverse -from smartpicasso.app.user.models import User from rest_framework import status +from rest_framework.test import APITestCase, APIClient + +from smartpicasso.app.user.models import User class UserApiTest(APITestCase): @@ -19,3 +21,11 @@ class UserApiTest(APITestCase): self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertEqual(response.data['success'], 'True') self.assertIn('token', response.data) + + +class UserTest(TestCase): + + def test_user_str(self): + email = 'test@test.com' + user = User.objects.create_user(email=email, password='test') + self.assertEqual(str(user), email)