mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-04 13:49:57 -05:00
Adding toggle to Channel page to stop downloading comments for certain channels.
This commit is contained in:
parent
47d4d72bf8
commit
581d5eaf6e
20 changed files with 150 additions and 77 deletions
|
|
@ -288,6 +288,25 @@ async def test_import_channel_delete_missing_channels(await_switches, test_sessi
|
|||
assert str(channel2.directory) not in test_channels_config.read_text()
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_import_channel_download_comments(await_switches, test_session, channel_factory,
|
||||
test_channels_config):
|
||||
channel = channel_factory()
|
||||
assert channel.download_missing_data is True
|
||||
|
||||
# download_missing_data is saved to the config.
|
||||
save_channels_config()
|
||||
await await_switches()
|
||||
assert 'download_missing_data: true' in test_channels_config.read_text()
|
||||
|
||||
# change download_missing_data to False, channel should be updated on import.
|
||||
contents = test_channels_config.read_text()
|
||||
contents = contents.replace('download_missing_data: true', 'download_missing_data: false')
|
||||
test_channels_config.write_text(contents)
|
||||
import_channels_config()
|
||||
assert channel.download_missing_data is False
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_ffprobe_json(async_client, video_file, corrupted_video_file):
|
||||
content = await common.ffprobe_json(video_file)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue