gnu.lister: Move tests datadir into its dedicated folder

Relatd D2076#inline-13551
This commit is contained in:
Antoine R. Dumont (@ardumont) 2019-10-10 11:50:11 +02:00
parent 0f0b840178
commit ef2c1847e4
No known key found for this signature in database
GPG key ID: 52E2E9840D10C3B8
3 changed files with 4 additions and 4 deletions

View file

@ -92,7 +92,7 @@ def test_tree_json_failures(requests_mock_datadir):
tree_json.projects['https://ftp.gnu.org/old-gnu/xshogi/']
def test_find_artifacts_small_sample():
def test_find_artifacts_small_sample(datadir):
expected_tarballs = [
{
'archive': '/root/artanis/artanis-0.2.1.tar.bz2',
@ -116,13 +116,13 @@ def test_find_artifacts_small_sample():
},
]
file_structure = json.load(open('swh/lister/gnu/tests/tree.min.json'))
file_structure = json.load(open(path.join(datadir, 'tree.min.json')))
actual_tarballs = find_artifacts(file_structure, '/root/')
assert actual_tarballs == expected_tarballs
def test_find_artifacts():
file_structure = json.load(open('swh/lister/gnu/tests/tree.json'))
def test_find_artifacts(datadir):
file_structure = json.load(open(path.join(datadir, 'tree.json')))
actual_tarballs = find_artifacts(file_structure, '/root/')
assert len(actual_tarballs) == 42 + 3 # tar + zip