diff options
author | 2018-07-10 06:46:42 +0000 | |
---|---|---|
committer | 2018-07-10 06:46:42 +0000 | |
commit | a24b83857c7a9c0a8ed1e36701205ca6265fd362 (patch) | |
tree | 26549f1b27d1d9c5f7fd43ba4eb4c9fd56a45b6d /tests | |
parent | Remove space from end of `JAMMERS_ROLE` id in constants.py (diff) | |
parent | Fix duplicate channel names in test. (diff) |
Merge branch 'fix-numbers-in-channel-names' into 'master'
Allow numbers in channel names
See merge request python-discord/projects/site!17
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_api_bot_off_topic_names.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/test_api_bot_off_topic_names.py b/tests/test_api_bot_off_topic_names.py index 4c9c782b..f0d0fe3e 100644 --- a/tests/test_api_bot_off_topic_names.py +++ b/tests/test_api_bot_off_topic_names.py @@ -36,7 +36,7 @@ class AddingANameOffTopicEndpointTests(SiteTest): self.assert200(response) -class AddingChannelNameToDatabaseEndpointTests(SiteTest): +class AddingChannelNamesToDatabaseEndpointTests(SiteTest): """Tests fetching names from the database with GET.""" CHANNEL_NAME = 'bisks-disks' @@ -59,6 +59,18 @@ class AddingChannelNameToDatabaseEndpointTests(SiteTest): self.assertIn(self.CHANNEL_NAME, response.json) +class AllowsNumbersInNames(SiteTest): + """Tests that the site allows names with numbers in them.""" + + def test_allows_numbers_in_names(self): + response = self.client.post( + f'/bot/off-topic-names?name=totallynot42', + app.config['API_SUBDOMAIN'], + headers=app.config['TEST_HEADER'] + ) + self.assert200(response) + + class RandomSampleEndpointTests(SiteTest): """Tests fetching random names from the website with GET.""" |