def test_form(self): form = ActivityForm(self.activity) self.assertIsNotNone(form) self.assertTrue(form.is_bound) self.assertTrue(form.is_valid())
def test_lost_title(self): self.activity['title'] = '' form = ActivityForm(self.activity) self.assertTrue(form.is_bound) self.assertFalse(form.is_valid())
def test_lost_reward_cost_type(self): self.activity['reward_cost_type'] = '' form = ActivityForm(self.activity) self.assertTrue(form.is_bound) self.assertFalse(form.is_valid())
def test_correct(self): form = ActivityForm(self.activity) self.assertTrue(form.is_bound) self.assertTrue(form.is_valid())