def test_user_form_update(self):
     LOGGER.debug("Test user form create")
     data = {
         'username': '******',
         'first_name': 'user',
         'last_name': 'Two',
         'last_login': '******',
         'date_joined': '2012-09-04 06:00',
         'manually_edited': False
     }
     form = UserForm(data, instance=self.user1)
     self.assertTrue(form.is_valid())
     form.save()
     self.assertEquals(self.user1.last_name, 'Two')
 def test_user_form_update(self):
     LOGGER.debug("Test user form create")
     data = {
         'username': '******',
         'first_name': 'user',
         'last_name': 'Two',
         'last_login': '******',
         'date_joined': '2012-09-04 06:00',
         'manually_edited': False
     }
     form = UserForm(data, instance=self.user1)
     self.assertTrue(form.is_valid())
     form.save()
     self.assertEquals(self.user1.last_name, 'Two')
 def test_user_form_create(self):
     LOGGER.debug("Test user form create")
     data = {
         'username': '******',
         'password': '******',
         'email': '*****@*****.**',
         'first_name': 'user',
         'last_name': '2',
         'last_login': '******',
         'date_joined': '2012-09-04 06:00',
         'manually_edited': False
     }
     form = UserForm(data)
     self.assertTrue(form.is_valid())
     form.save()
     user2 = User.objects.get(username='******')
     self.assertEquals(user2.username, 'user2')
 def test_user_form_create(self):
     LOGGER.debug("Test user form create")
     data = {
         'username': '******',
         'password': '******',
         'email': '*****@*****.**',
         'first_name': 'user',
         'last_name': '2',
         'last_login': '******',
         'date_joined': '2012-09-04 06:00',
         'manually_edited': False
     }
     form = UserForm(data)
     self.assertTrue(form.is_valid())
     form.save()
     user2 = User.objects.get(username='******')
     self.assertEquals(user2.username, 'user2')