diff --git a/hc/front/tests/test_add_spike.py b/hc/front/tests/test_add_spike.py index bf7c9e72..a4db935c 100644 --- a/hc/front/tests/test_add_spike.py +++ b/hc/front/tests/test_add_spike.py @@ -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") \ No newline at end of file + self.assertContains(r, "Enter a valid URL")