예제 #1
0
 def test_vertex_get_data(self, client: HiroClient):
     from arago.hiro.backend.six.graph import Hiro6GraphData
     graph = Hiro6GraphData(client)
     vertex_id = OgitEntity.OGIT_COMMENT.value.name.uri
     res = graph.vertex.get(vertex_id)
     assert isinstance(res, dict)
     pass
예제 #2
0
 def test_vertex_delete_data(self, client: HiroClient):
     from arago.hiro.backend.six.graph import Hiro6GraphModel
     from arago.hiro.backend.six.graph import Hiro6GraphData
     graph_m = Hiro6GraphModel(client)
     graph = Hiro6GraphData(client)
     comment_v = graph_m.vertex.create(OgitEntity.OGIT_COMMENT)
     res = graph.vertex.delete(comment_v.id)
     assert isinstance(res, dict)
     pass
예제 #3
0
 def test_edge_delete_data(self, client: HiroClient):
     from arago.hiro.backend.six.graph import Hiro6GraphModel
     from arago.hiro.backend.six.graph import Hiro6GraphData
     graph_m = Hiro6GraphModel(client)
     graph = Hiro6GraphData(client)
     vertex_a = graph_m.vertex.create(OgitEntity.OGIT_ATTACHMENT)
     vertex_b = graph_m.vertex.create(OgitEntity.OGIT_COMMENT)
     edge_c = graph_m.edge.create(vertex_a, OgitVerb.OGIT_BELONGS, vertex_b)
     res = graph.edge.delete(edge_c.id)
     isinstance(res, dict)
     pass
예제 #4
0
 def test_edge_create_data(self, client: HiroClient):
     from arago.hiro.backend.six.graph import Hiro6GraphModel
     from arago.hiro.backend.six.graph import Hiro6GraphData
     graph_m = Hiro6GraphModel(client)
     graph = Hiro6GraphData(client)
     vertex_a = graph_m.vertex.create(OgitEntity.OGIT_ATTACHMENT)
     vertex_b = graph_m.vertex.create(OgitEntity.OGIT_COMMENT)
     edge_type = OgitVerb.OGIT_BELONGS.value.name.uri
     res = graph.edge.create(vertex_a.id, edge_type, vertex_b.id)
     isinstance(res, dict)
     pass
예제 #5
0
 def test_vertex_history_data(self, client: HiroClient):
     from arago.hiro.backend.six.graph import Hiro6GraphData
     res_1 = client.root.model.search.index(
         rf'''ogit\/_type:"{OgitEntity.OGIT_LICENSE_REQUEST.value.name.uri!s}"'''
     )
     vertex = next(res_1)
     graph = Hiro6GraphData(client)
     res_2 = graph.vertex.history(vertex.id)
     assert isinstance(res_2, Generator)
     vertex = next(res_2)
     assert isinstance(vertex, dict)
     pass