diff --git a/hc/front/tests/test_add_channel.py b/hc/front/tests/test_add_channel.py index ec50c187..0ddc5f58 100644 --- a/hc/front/tests/test_add_channel.py +++ b/hc/front/tests/test_add_channel.py @@ -12,7 +12,7 @@ class AddChannelTestCase(TestCase): self.alice.save() def test_it_works(self): - url = "/channels/add/" + url = "/integrations/add/" form = {"kind": "email", "value": "alice@example.org"} self.client.login(username="alice", password="password") @@ -22,7 +22,7 @@ class AddChannelTestCase(TestCase): assert Channel.objects.count() == 1 def test_it_rejects_bad_kind(self): - url = "/channels/add/" + url = "/integrations/add/" form = {"kind": "dog", "value": "Lassie"} self.client.login(username="alice", password="password") diff --git a/hc/front/tests/test_channel_checks.py b/hc/front/tests/test_channel_checks.py index a4b48f0f..1d450949 100644 --- a/hc/front/tests/test_channel_checks.py +++ b/hc/front/tests/test_channel_checks.py @@ -16,7 +16,7 @@ class ChannelChecksTestCase(TestCase): self.channel.save() def test_it_works(self): - url = "/channels/%s/checks/" % self.channel.code + url = "/integrations/%s/checks/" % self.channel.code self.client.login(username="alice", password="password") r = self.client.get(url) @@ -29,14 +29,14 @@ class ChannelChecksTestCase(TestCase): # channel does not belong to mallory so this should come back # with 403 Forbidden: - url = "/channels/%s/checks/" % self.channel.code + url = "/integrations/%s/checks/" % self.channel.code self.client.login(username="mallory", password="password") r = self.client.get(url) assert r.status_code == 403 def test_missing_channel(self): # Valid UUID but there is no channel for it: - url = "/channels/6837d6ec-fc08-4da5-a67f-08a9ed1ccf62/checks/" + url = "/integrations/6837d6ec-fc08-4da5-a67f-08a9ed1ccf62/checks/" self.client.login(username="alice", password="password") r = self.client.get(url) diff --git a/hc/front/tests/test_remove_channel.py b/hc/front/tests/test_remove_channel.py index a27bae2e..22b67bb4 100644 --- a/hc/front/tests/test_remove_channel.py +++ b/hc/front/tests/test_remove_channel.py @@ -16,7 +16,7 @@ class RemoveChannelTestCase(TestCase): self.channel.save() def test_it_works(self): - url = "/channels/%s/remove/" % self.channel.code + url = "/integrations/%s/remove/" % self.channel.code self.client.login(username="alice", password="password") r = self.client.post(url) @@ -25,14 +25,14 @@ class RemoveChannelTestCase(TestCase): assert Channel.objects.count() == 0 def test_it_handles_bad_uuid(self): - url = "/channels/not-uuid/remove/" + url = "/integrations/not-uuid/remove/" self.client.login(username="alice", password="password") r = self.client.post(url) assert r.status_code == 400 def test_it_checks_owner(self): - url = "/channels/%s/remove/" % self.channel.code + url = "/integrations/%s/remove/" % self.channel.code mallory = User(username="mallory") mallory.set_password("password") @@ -44,7 +44,7 @@ class RemoveChannelTestCase(TestCase): def test_it_handles_missing_uuid(self): # Valid UUID but there is no channel for it: - url = "/channels/6837d6ec-fc08-4da5-a67f-08a9ed1ccf62/remove/" + url = "/integrations/6837d6ec-fc08-4da5-a67f-08a9ed1ccf62/remove/" self.client.login(username="alice", password="password") r = self.client.post(url) diff --git a/hc/front/tests/test_update_channel.py b/hc/front/tests/test_update_channel.py index de0acce0..fcf1af59 100644 --- a/hc/front/tests/test_update_channel.py +++ b/hc/front/tests/test_update_channel.py @@ -25,7 +25,7 @@ class UpdateChannelTestCase(TestCase): } self.client.login(username="alice", password="password") - r = self.client.post("/channels/", data=payload) + r = self.client.post("/integrations/", data=payload) assert r.status_code == 302 channel = Channel.objects.get(code=self.channel.code) @@ -41,7 +41,7 @@ class UpdateChannelTestCase(TestCase): payload = {"channel": self.channel.code} self.client.login(username="mallory", password="password") - r = self.client.post("/channels/", data=payload) + r = self.client.post("/integrations/", data=payload) # self.channel does not belong to mallory, this should fail-- assert r.status_code == 403 @@ -60,7 +60,7 @@ class UpdateChannelTestCase(TestCase): "check-%s" % self.check.code: True } self.client.login(username="mallory", password="password") - r = self.client.post("/channels/", data=payload) + r = self.client.post("/integrations/", data=payload) # mc belongs to mallorym but self.check does not-- assert r.status_code == 403 @@ -70,7 +70,7 @@ class UpdateChannelTestCase(TestCase): payload = {"channel": "6837d6ec-fc08-4da5-a67f-08a9ed1ccf62"} self.client.login(username="alice", password="password") - r = self.client.post("/channels/", data=payload) + r = self.client.post("/integrations/", data=payload) assert r.status_code == 400 def test_it_handles_missing_check(self): @@ -81,5 +81,5 @@ class UpdateChannelTestCase(TestCase): } self.client.login(username="alice", password="password") - r = self.client.post("/channels/", data=payload) + r = self.client.post("/integrations/", data=payload) assert r.status_code == 400 diff --git a/hc/front/tests/test_verify_email.py b/hc/front/tests/test_verify_email.py index 0229c24d..98ccd046 100644 --- a/hc/front/tests/test_verify_email.py +++ b/hc/front/tests/test_verify_email.py @@ -17,7 +17,7 @@ class VerifyEmailTestCase(TestCase): def test_it_works(self): token = self.channel.make_token() - url = "/channels/%s/verify/%s/" % (self.channel.code, token) + url = "/integrations/%s/verify/%s/" % (self.channel.code, token) r = self.client.post(url) assert r.status_code == 200, r.status_code @@ -26,7 +26,7 @@ class VerifyEmailTestCase(TestCase): assert channel.email_verified def test_it_handles_bad_token(self): - url = "/channels/%s/verify/bad-token/" % self.channel.code + url = "/integrations/%s/verify/bad-token/" % self.channel.code r = self.client.post(url) assert r.status_code == 200, r.status_code @@ -38,7 +38,7 @@ class VerifyEmailTestCase(TestCase): # Valid UUID, and even valid token but there is no channel for it: code = "6837d6ec-fc08-4da5-a67f-08a9ed1ccf62" token = self.channel.make_token() - url = "/channels/%s/verify/%s/" % (code, token) + url = "/integrations/%s/verify/%s/" % (code, token) r = self.client.post(url) assert r.status_code == 404