diff options
author | 2020-03-31 13:54:59 +0300 | |
---|---|---|
committer | 2020-03-31 13:54:59 +0300 | |
commit | d6f657143fa38657fb0432b9adb779969e920c64 (patch) | |
tree | 32b66cc520d05d1efff1cc5fc60d60c4172d145a | |
parent | (Off-topic Channel Names Viewset Tests): Added test for default handling `mar... (diff) |
(Off-topic Channel Names Viewset Tests): Added test for handling running out of names.
-rw-r--r-- | pydis_site/apps/api/tests/test_off_topic_channel_names.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pydis_site/apps/api/tests/test_off_topic_channel_names.py b/pydis_site/apps/api/tests/test_off_topic_channel_names.py index be0d5001..06624d89 100644 --- a/pydis_site/apps/api/tests/test_off_topic_channel_names.py +++ b/pydis_site/apps/api/tests/test_off_topic_channel_names.py @@ -95,6 +95,13 @@ class ListTests(APISubdomainTestCase): self.assertEqual(response.status_code, 200) self.assertEqual(response.json(), [self.test_name.name]) + def test_running_out_of_names_with_mark_used_parameter(self): + url = reverse('bot:offtopicchannelname-list', host='api') + response = self.client.get(f'{url}?random_items=2&mark_used=true') + + self.assertEqual(response.status_code, 200) + self.assertEqual(response.json(), [self.test_name.name, self.test_name_2.name]) + class CreationTests(APISubdomainTestCase): def setUp(self): |