Skip to content

Commit

Permalink
update tests to match new demo setup
Browse files Browse the repository at this point in the history
  • Loading branch information
robinandeer committed May 17, 2017
1 parent 2c01ca1 commit 65efafe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions chanjo/init/bootstrap.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import logging
import zipfile
from urllib.request import urlretrieve
import urllib.request

from path import Path

Expand Down Expand Up @@ -29,7 +29,7 @@ def pull(target_dir, force=False): # pragma: no cover

if not final_bed.exists() or force:
logger.info('downloading... [%s]', BED_URL)
urlretrieve(BED_URL, bed_zip_path)
urllib.request.urlretrieve(BED_URL, bed_zip_path)

logger.info('extracting BED file...')
zip_ref = zipfile.ZipFile(bed_zip_path, 'r')
Expand Down
4 changes: 2 additions & 2 deletions tests/init/test_init_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ def test_init_demo(tmpdir, invoke_cli):
target_dir = tmpdir.join('chanjo-demo')
target_path = str(target_dir)
result = invoke_cli(['init', '--demo', target_path])
# THEN is should work and place 6 + 1 (config) in the folder
# THEN is should work and place 4 demo files + 1 sqlite db + 1 config
assert result.exit_code == 0
assert len(target_dir.listdir()) == 7
assert len(target_dir.listdir()) == (4 + 1 + 1)


@patch('urllib.request.urlretrieve', fake_urlretrieve)
Expand Down

0 comments on commit 65efafe

Please sign in to comment.