Update tests for use with callbacks

This commit is contained in:
Serene-Arc 2021-10-02 12:11:53 +10:00
parent 2d6e25d1ac
commit 327cce5581

View File

@ -22,7 +22,7 @@ def test_can_handle_link(test_url: str, expected: bool):
@pytest.mark.online
@pytest.mark.slow
@pytest.mark.parametrize(('test_url', 'expected_hash'), (
('https://streamable.com/dt46y', '1e7f4928e55de6e3ca23d85cc9246bbb'),
('https://streamable.com/dt46y', 'b7e465adaade5f2b6d8c2b4b7d0a2878'),
('https://streamable.com/t8sem', '49b2d1220c485455548f1edbc05d4ecf'),
('https://www.reddit.com/r/specializedtools/comments/n2nw5m/bamboo_splitter/', '21968d3d92161ea5e0abdcaf6311b06c'),
('https://v.redd.it/9z1dnk3xr5k61', '351a2b57e888df5ccbc508056511f38d'),
@ -34,4 +34,6 @@ def test_find_resources(test_url: str, expected_hash: str):
resources = downloader.find_resources()
assert len(resources) == 1
assert isinstance(resources[0], Resource)
for res in resources:
res.download()
assert resources[0].hash.hexdigest() == expected_hash