Browse Source

Fix tests.

pull/405/head
Pēteris Caune 4 years ago
parent
commit
1f978ff80e
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      hc/front/tests/test_add_spike.py

+ 5
- 3
hc/front/tests/test_add_spike.py View File

@ -3,7 +3,9 @@ from hc.test import BaseTestCase
class AddSpikeTestCase(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): def test_instructions_work(self):
self.client.login(username="[email protected]", password="password") self.client.login(username="[email protected]", password="password")
@ -15,7 +17,7 @@ class AddSpikeTestCase(BaseTestCase):
self.client.login(username="[email protected]", password="password") self.client.login(username="[email protected]", password="password")
r = self.client.post(self.url, form) r = self.client.post(self.url, form)
self.assertRedirects(r, "/integrations/")
self.assertRedirects(r, self.channels_url)
c = Channel.objects.get() c = Channel.objects.get()
self.assertEqual(c.kind, "spike") self.assertEqual(c.kind, "spike")
@ -27,4 +29,4 @@ class AddSpikeTestCase(BaseTestCase):
self.client.login(username="[email protected]", password="password") self.client.login(username="[email protected]", password="password")
r = self.client.post(self.url, form) r = self.client.post(self.url, form)
self.assertContains(r, "Enter a valid URL")
self.assertContains(r, "Enter a valid URL")

Loading…
Cancel
Save