Ejemplo n.º 1
0
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"'
Ejemplo n.º 2
0
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__ + '#'])
Ejemplo n.º 3
0
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__ + '#'])
Ejemplo n.º 4
0
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"'
Ejemplo n.º 5
0
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__ + "#"])
Ejemplo n.º 6
0
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"'