Esempio n. 1
0
 def test_form(self):
     form = ActivityForm(self.activity)
     self.assertIsNotNone(form)
     self.assertTrue(form.is_bound)
     self.assertTrue(form.is_valid())
Esempio n. 2
0
 def test_lost_title(self):
     self.activity['title'] = ''
     form = ActivityForm(self.activity)
     self.assertTrue(form.is_bound)
     self.assertFalse(form.is_valid())
Esempio n. 3
0
 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())
Esempio n. 4
0
 def test_correct(self):
     form = ActivityForm(self.activity)
     self.assertTrue(form.is_bound)
     self.assertTrue(form.is_valid())