|
@ -7,6 +7,8 @@ class CopyCheckTestCase(BaseTestCase): |
|
|
super(CopyCheckTestCase, self).setUp() |
|
|
super(CopyCheckTestCase, self).setUp() |
|
|
self.check = Check(project=self.project) |
|
|
self.check = Check(project=self.project) |
|
|
self.check.name = "Foo" |
|
|
self.check.name = "Foo" |
|
|
|
|
|
self.check.subject = "success-keyword" |
|
|
|
|
|
self.check.subject_fail = "failure-keyword" |
|
|
self.check.save() |
|
|
self.check.save() |
|
|
|
|
|
|
|
|
self.copy_url = "/checks/%s/copy/" % self.check.code |
|
|
self.copy_url = "/checks/%s/copy/" % self.check.code |
|
@ -16,6 +18,8 @@ class CopyCheckTestCase(BaseTestCase): |
|
|
r = self.client.post(self.copy_url, follow=True) |
|
|
r = self.client.post(self.copy_url, follow=True) |
|
|
self.assertContains(r, "This is a brand new check") |
|
|
self.assertContains(r, "This is a brand new check") |
|
|
self.assertContains(r, "Foo (copy)") |
|
|
self.assertContains(r, "Foo (copy)") |
|
|
|
|
|
self.assertContains(r, "success-keyword") |
|
|
|
|
|
self.assertContains(r, "failure-keyword") |
|
|
|
|
|
|
|
|
def test_it_obeys_limit(self): |
|
|
def test_it_obeys_limit(self): |
|
|
self.profile.check_limit = 0 |
|
|
self.profile.check_limit = 0 |
|
|