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