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"]}'