diff options
author | 2020-03-31 13:50:39 +0300 | |
---|---|---|
committer | 2020-03-31 13:50:39 +0300 | |
commit | 02315e7339858ae6a11bc742446a14b7220894ca (patch) | |
tree | 6d4511a15709d1beb07acaebc816260e09a81a07 /pydis_site/apps/api/tests | |
parent | (Off-topic Channel Names Viewset Tests): Added used parameter to list tests. (diff) |
(Off-topic Channel Names Viewset Tests): Added test for default handling `mark_used` parameter.
Diffstat (limited to 'pydis_site/apps/api/tests')
-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 fea3932b..be0d5001 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 @@ -88,6 +88,13 @@ class ListTests(APISubdomainTestCase): self.assertEqual(response.status_code, 200) self.assertEqual(len(response.json()), 1) + def test_returns_single_correct_item_with_mark_used_parameter_true_and_random_items_1(self): + url = reverse('bot:offtopicchannelname-list', host='api') + response = self.client.get(f'{url}?random_items=1&mark_used=true') + + self.assertEqual(response.status_code, 200) + self.assertEqual(response.json(), [self.test_name.name]) + class CreationTests(APISubdomainTestCase): def setUp(self): |