コード例 #1
0
 def test_valid_form(self):
     t = self.create_triggerservice()
     data = {
         'description': t.description,
     }
     form = TriggerServiceForm(data=data)
     self.assertTrue(form.is_valid())
コード例 #2
0
 def test_invalid_form(self):
     t = self.create_triggerservice()
     t.description = ''
     data = {'description': t.description, }
     form = TriggerServiceForm(data=data)
     self.assertFalse(form.is_valid())