mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-01 04:16:24 -05:00
Added channel whitespace test
This commit is contained in:
parent
d04a9c05d0
commit
9a1fe7323a
1 changed files with 4 additions and 1 deletions
|
|
@ -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"]}'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue