def test_edge_properties_with_graphson2(self): """ Test that the edge property deserializer return a dict, and not a set. @since 3.20 @jira_ticket PYTHON-1033 @expected_result the properties are stored in a dict @test_category dse graph """ generate_classic(self.session) epg2 = self.session.execution_profile_clone_update( EXEC_PROFILE_GRAPH_DEFAULT) epg2.graph_options.graph_protocol = GraphProtocol.GRAPHSON_2_0 epg2.row_factory = graph_graphson2_row_factory rs = self.session.execute_graph('g.E()', execution_profile=epg2) for edge in rs: validate_classic_edge(self, edge)
def test_classic_graph(self): """ Test to validate that basic graph generation, and vertex and edges are surfaced correctly Creates a simple classic tinkerpot graph, and iterates over the the vertices and edges ensureing that each one is correct. See reference graph here http://www.tinkerpop.com/docs/3.0.0.M1/ @since 1.0.0 @jira_ticket PYTHON-457 @expected_result graph should generate and all vertices and edge results should be @test_category dse graph """ generate_classic(self.session) rs = self.session.execute_graph('g.V()') for vertex in rs: validate_classic_vertex(self, vertex) rs = self.session.execute_graph('g.E()') for edge in rs: validate_classic_edge(self, edge)
def test_result_forms(self): """ Test to validate that geometric types function correctly Creates a very simple graph, and tries to insert a simple point type @since 1.0.0 @jira_ticket DSP-8087 @expected_result json types assoicated with insert is parsed correctly @test_category dse graph """ generate_classic(self.session) rs = list(self.session.execute_graph('g.V()')) self.assertGreater(len(rs), 0, "Result set was empty this was not expected") for v in rs: validate_classic_vertex(self, v) rs = list(self.session.execute_graph('g.E()')) self.assertGreater(len(rs), 0, "Result set was empty this was not expected") for e in rs: validate_classic_edge(self, e)
def _validate_classic_edge(self, g, edge): validate_classic_edge(self, edge)