Skip to content

Commit

Permalink
fix neptune tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonLuttenberger committed Dec 18, 2023
1 parent 185f936 commit f00e07a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tests/unit/test_neptune_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,25 @@ def test_parse_gremlin_edge_elements(gremlin_parser):
out = gremlin_parser.gremlin_results_to_dict(input)
df = pd.DataFrame.from_records(out)
row = df.iloc[0]
assert df.shape == (1, 4)
assert df.shape == (1, 5)
assert row["id"] == "foo"
assert row["outV"] == "out1"
assert row["label"] == "label"
assert row["inV"] == "in1"
assert row["properties"] is None

# parse multiple edge elements
v1 = Edge("bar", "out1", "label", "in2")
input = [v, v1]
out = gremlin_parser.gremlin_results_to_dict(input)
df = pd.DataFrame.from_records(out)
row = df.iloc[1]
assert df.shape == (2, 4)
assert df.shape == (2, 5)
assert row["id"] == "bar"
assert row["outV"] == "out1"
assert row["label"] == "label"
assert row["inV"] == "in2"
assert row["properties"] is None


# parse Property elements
Expand All @@ -91,11 +93,10 @@ def test_parse_gremlin_property_elements(gremlin_parser):
out = gremlin_parser.gremlin_results_to_dict(input)
df = pd.DataFrame.from_records(out)
row = df.iloc[0]
assert df.shape == (1, 4)
assert df.shape == (1, 3)
assert row["element"] == "bar"
assert row["value"] == "name"
assert row["key"] == "foo"
assert row["properties"] is None


# parse Path elements
Expand Down Expand Up @@ -133,7 +134,7 @@ def test_parse_gremlin_path_elements(gremlin_parser):
out = gremlin_parser.gremlin_results_to_dict([p])
df = pd.DataFrame.from_records(out)
row = df.iloc[0]
assert df.shape == (1, 4)
assert df.shape == (1, 3)
assert row[0]["name"] == "foo"
assert row[0]["age"] == 29
assert row[1]["dist"] == 32
Expand All @@ -148,7 +149,7 @@ def test_parse_gremlin_path_elements(gremlin_parser):
out = gremlin_parser.gremlin_results_to_dict([p])
df = pd.DataFrame.from_records(out)
row = df.iloc[0]
assert df.shape == (1, 4)
assert df.shape == (1, 3)
assert row[0]["name"] == "foo"
assert row[0]["age"] == 29
assert row[1] == {"id": "bar", "label": "label", "outV": "out1", "inV": "in2"}
Expand Down

0 comments on commit f00e07a

Please sign in to comment.