예제 #1
0
def test_ensure_tiles(mocker):
    mocker.patch('subprocess.check_call')
    cmd = datasource.ensure_tiles('/tmp', ['a', 'b'])
    assert cmd == 'make -C /tmp download ENSURE_TILES="a b"'
    subprocess.check_call.assert_called_once_with(cmd, shell=True)
예제 #2
0
def test_ensure_tiles(mocker):
    with mocker.patch('subprocess.check_call'):
        cmd = datasource.ensure_tiles('/tmp', ['a', 'b'], make_flags='-s')
    assert cmd == 'make -C /tmp -s download ENSURE_TILES="a b"'
    subprocess.check_call.assert_called_once_with(cmd, shell=True)