|
|
@ -152,6 +152,17 @@ class UpdateCheckTestCase(BaseTestCase): |
|
|
|
self.check.refresh_from_db() |
|
|
|
self.assertEqual(self.check.channel_set.count(), 0) |
|
|
|
|
|
|
|
def test_it_rejects_non_uuid_channel_code(self): |
|
|
|
r = self.post(self.check.code, { |
|
|
|
"api_key": "X" * 32, |
|
|
|
"channels": "foo" |
|
|
|
}) |
|
|
|
|
|
|
|
self.assertEqual(r.status_code, 400) |
|
|
|
|
|
|
|
self.check.refresh_from_db() |
|
|
|
self.assertEqual(self.check.channel_set.count(), 0) |
|
|
|
|
|
|
|
def test_it_rejects_non_string_channels_key(self): |
|
|
|
r = self.post(self.check.code, { |
|
|
|
"api_key": "X" * 32, |
|
|
|