Exemplo n.º 1
0
def get_format_node_list():
    query = "MATCH (f:Format) return f.Name"
    rewrite(("http", "0.0.0.0", 7474), ("http", "52.48.147.125", 7474))
    result = get_graph().cypher.execute(query)
    ret = []
    for it in result:
        ret.append(it.__getattribute__("f.Name"))
    return ret
Exemplo n.º 2
0
def get_colors_synonymes():
    query = "MATCH (cs:ColorSynonyme)-[:REL_HAS]-(c:Color) return cs.Name, c.Name"
    rewrite(("http", "0.0.0.0", 7474), ("http", "52.48.147.125", 7474))
    result = get_graph().cypher.execute(query)
    ret = {}
    for it in result:
        ret[it.__getattribute__("cs.Name").encode(
            "utf-8")] = it.__getattribute__("c.Name").encode("utf-8")
    return ret
Exemplo n.º 3
0
def test_can_remove_unknown_rewrite_uri():
    rewrite(("https", "localnonsense", 4747), None)
Exemplo n.º 4
0
def test_can_remove_rewrite_uri():
    rewrite(("https", "localtoast", 4747), ("http", "localhost", 7474))
    rewrite(("https", "localtoast", 4747), None)
    assert Resource(
        "https://localtoast:4747/").uri == "https://localtoast:4747/"
Exemplo n.º 5
0
def test_can_remove_unknown_rewrite_uri():
    rewrite(("https", "localnonsense", 4747), None)
Exemplo n.º 6
0
def test_can_remove_rewrite_uri():
    rewrite(("https", "localtoast", 4747), ("http", "localhost", 7474))
    rewrite(("https", "localtoast", 4747), None)
    assert Resource("https://localtoast:4747/").uri == "https://localtoast:4747/"