def test_map_json_for_name(tmpdir): maps = tmpdir.mkdir('maps') maps.mkdir('Escherichia coli').join( 'iJO1366.Central metabolism.json').write('"temp"') json = map_json_for_name('iJO1366.Central metabolism', cache_dir=str(tmpdir)) assert json == '"temp"'
def test_map_json_for_name_web(tmpdir): data = map_json_for_name('iJO1366.Central metabolism', cache_dir=str(tmpdir)) root = get_url('escher_root', protocol='https').rstrip('/') assert json.loads(data)[0]['schema'] == '/'.join( [root, 'escher', 'jsonschema', __schema_version__ + '#'])
def test_map_json_for_name_web(tmpdir): data = map_json_for_name('iJO1366.Central metabolism', cache_dir=str(tmpdir)) root = get_url('escher_root', protocol='https').rstrip('/') assert json.loads(data)[0]['schema'] == '/'.join([root, 'escher', 'jsonschema', __schema_version__ + '#'])
def test_map_json_for_name(tmpdir): maps = tmpdir.mkdir('maps') maps.mkdir('Escherichia coli').join('iJO1366.Central metabolism.json').write('"temp"') json = map_json_for_name('iJO1366.Central metabolism', cache_dir=str(tmpdir)) assert json == '"temp"'
def test_map_json_for_name_web(tmpdir): data = map_json_for_name("iJO1366.Central metabolism", cache_dir=str(tmpdir)) root = get_url("escher_root", protocol="https").rstrip("/") assert json.loads(data)[0]["schema"] == "/".join([root, "escher", "jsonschema", __schema_version__ + "#"])
def test_map_json_for_name(tmpdir): maps = tmpdir.mkdir("maps") maps.mkdir("Escherichia coli").join("iJO1366.Central metabolism.json").write('"temp"') json = map_json_for_name("iJO1366.Central metabolism", cache_dir=str(tmpdir)) assert json == '"temp"'