From 9a1fe7323afc0c1b51ee32d0dc84caf909017952 Mon Sep 17 00:00:00 2001 From: StruckCroissant Date: Sun, 13 Feb 2022 00:06:42 -0600 Subject: [PATCH] Added channel whitespace test --- modules/videos/channel/test/test_api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/videos/channel/test/test_api.py b/modules/videos/channel/test/test_api.py index 0d00600a..3af4c84f 100644 --- a/modules/videos/channel/test/test_api.py +++ b/modules/videos/channel/test/test_api.py @@ -50,7 +50,7 @@ class TestVideoAPI(TestAPI): new_channel = dict( directory=channel_directory, match_regex='asdf', - name='Example Channel 1', + name=' Example Channel 1 ', url='https://example.com/channel1', ) @@ -67,6 +67,9 @@ class TestVideoAPI(TestAPI): self.assertIsNotNone(created) self.assertIsNotNone(created['id']) + # Channel name leading/trailing whitespace should be stripped + assert created['name'] == 'Example Channel 1' + # Channel directory should be relative to the media directory assert not pathlib.Path(created['directory']).is_absolute(), \ f'Channel directory is absolute: {created["directory"]}'