forked from GithubBackups/healthchecks
Fix tests.
This commit is contained in:
parent
6300947c77
commit
1f978ff80e
@ -3,7 +3,9 @@ from hc.test import BaseTestCase
|
||||
|
||||
|
||||
class AddSpikeTestCase(BaseTestCase):
|
||||
url = "/integrations/add_spike/"
|
||||
def setUp(self):
|
||||
super(AddSpikeTestCase, self).setUp()
|
||||
self.url = "/projects/%s/add_spike/" % self.project.code
|
||||
|
||||
def test_instructions_work(self):
|
||||
self.client.login(username="alice@example.org", password="password")
|
||||
@ -15,7 +17,7 @@ class AddSpikeTestCase(BaseTestCase):
|
||||
|
||||
self.client.login(username="alice@example.org", password="password")
|
||||
r = self.client.post(self.url, form)
|
||||
self.assertRedirects(r, "/integrations/")
|
||||
self.assertRedirects(r, self.channels_url)
|
||||
|
||||
c = Channel.objects.get()
|
||||
self.assertEqual(c.kind, "spike")
|
||||
@ -27,4 +29,4 @@ class AddSpikeTestCase(BaseTestCase):
|
||||
|
||||
self.client.login(username="alice@example.org", password="password")
|
||||
r = self.client.post(self.url, form)
|
||||
self.assertContains(r, "Enter a valid URL")
|
||||
self.assertContains(r, "Enter a valid URL")
|
||||
|
Loading…
x
Reference in New Issue
Block a user