Minor documentation fix
[flowspy] / longerusername / tests.py
1 from django.contrib.auth.models import User
2 from django.test import TestCase
3
4 class LongerUsernameTests(TestCase):
5     """
6     Unit tests for longerusername app
7     """
8     def setUp(self):
9         """
10         creates a user with a terribly long username
11         """
12         long_username = ''.join([str(i) for i  in range(100)])
13         self.user = User.objects.create_user('test' + long_username, 'test@test.com', 'testpassword')
14     def testUserCreation(self):
15         """
16         tests that self.user was successfully saved, and can be retrieved
17         """
18         self.assertNotEqual(self.user,None)
19         User.objects.get(id=self.user.id) # returns DoesNotExist error if the user wasn't created