Merge pull request #590 from AbdullahM0hamed/split-test

Change split anime test
master
AbdullahM0hamed 2020-12-16 21:55:51 +00:00 committed by GitHub
commit 74e3d3738f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -1,15 +1,15 @@
import pytest
from anime_downloader import util
from unittest.mock import Mock
def test_split_anime():
anime_list = list(range(20))
assert len(util.split_anime(anime_list, '1:10')) == 9
anime = Mock()
anime._episode_urls = list(enumerate(range(20)))
assert len(util.split_anime(anime, '1:10')._episode_urls) == 9
def test_check_in_path_exists():
assert util.check_in_path('ls')
def test_check_in_path_not_exists():
assert not util.check_in_path('someAppI_madeUp')
assert not util.check_in_path('someAppI_madeUp')