Example #1
0
 def test_set_delete_form_fail(self):
     """Test successfull delete."""
     s = AssessSet(TestItemA)
     s.get_delete_form_context("bad_item_id_str")
     msg = "ERROR: Cannot delete item #bad_item_id_str in TestItemA - " + \
         "it does not exist."
     self.assertNotEqual(s.context['item_delete_heading'], '')
     self.assertEqual(s.context['item_delete_failure'], msg)
Example #2
0
 def test_set_delete_form_success(self):
     """Test successfull delete."""
     s = AssessSet(TestItemA)
     s.get_delete_form_context("1")
     msg = "Delete item a1 in TestItemA:"
     self.assertEqual(s.context['item_delete_heading'], msg)
     self.assertNotEqual(s.context['item_delete_notice'], '')
     self.assertNotEqual(s.context['item_delete_confirm'], '')
     self.assertNotEqual(s.context['item_delete_reject'], '')