def test_detach_bug_with_non_exist_bug(self): original_links_count = self.case_run.case.case_bug.count() nonexisting_bug = '{0}111'.format(self.bug_id) testcaserun.detach_bug(self.admin_request, self.case_run.pk, nonexisting_bug) self.assertEqual(original_links_count, self.case_run.case.case_bug.count())
def test_detach_bug(self): testcaserun.detach_bug(self.admin_request, self.case_run.pk, self.bug_id) self.assertFalse(self.case_run.case.case_bug.filter(bug_id=self.bug_id).exists())
def test_detach_bug_with_non_exist_id(self): original_links_count = self.case_run.case.case_bug.count() testcaserun.detach_bug(self.admin_request, 9999999, '123456') self.assertEqual(original_links_count, self.case_run.case.case_bug.count())
def test_detach_bug(self): testcaserun.detach_bug(self.admin_request, self.case_run.pk, self.bug_id) self.assertFalse( self.case_run.case.case_bug.filter(bug_id=self.bug_id).exists())