Skip to content

Commit

Permalink
fixed test remote_test
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandunn committed Oct 30, 2019
1 parent d92cc39 commit f66bbca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/remote_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,14 @@ def test_update_organism(self):

def test_add_organism(self):

meta = '{"bla": "bli"}';
meta = '{"bla": "bli"}'

with tempfile.NamedTemporaryFile(suffix='.tar.gz') as archive:
with tarfile.open(archive.name, mode="w:gz") as tar:
for file in glob.glob('test-data/dataset_1_files/data/'):
tar.add(file, arcname=file.replace('test-data/dataset_1_files/data/', './'))
res = wa.remote.add_organism('some_new_org_remote', archive, species='newspecies', genus='newgenus', metadata=meta)
# Note: we added this upstream, so we have to use another name to create a separate sample directory
res = wa.remote.add_organism('some_new_org_remote_v2', archive, species='newspecies', genus='newgenus', metadata=meta)

res = res[0]
assert res['species'] == 'newspecies'
Expand All @@ -90,7 +91,7 @@ def test_add_organism(self):

time.sleep(3)

org_info = wa.organisms.show_organism('some_new_org_remote')
org_info = wa.organisms.show_organism('some_new_org_remote_v2')

wa.remote.delete_organism(org_info['id'])

Expand Down

0 comments on commit f66bbca

Please sign in to comment.