예제 #1
0
 def test_no_commit(self):
     form = UserCreationForm(data=self.testdata)
     user = form.save(commit=False)
     self.assertIsNone(user.pk)
예제 #2
0
 def test_save_hash_password(self):
     form = UserCreationForm(data=self.testdata)
     user = form.save()
     self.assertIsNotNone(user.pk)
     self.assertTrue(user.check_password('test1234'))