Пример #1
0
 def setUp(self):
     indices = self.vertex_index_proxy(self.index_class, self.resource)
     self.people = NodeProxy(Person, self.resource)
     self.knows = RelationshipProxy(Knows, self.resource)
     self.people.index = indices.get_or_create("people")
     self.james = self.people.create(name="James", age=34)
     self.julie = self.people.create(name="Julie", age=28)
Пример #2
0
    def setUp(self):
        indicesV = self.vertex_index_proxy(self.index_class, self.client)
        indicesE = self.edge_index_proxy(self.index_class, self.client)

        self.people = NodeProxy(Person, self.client)
        self.people.index = indicesV.get_or_create("people")

        self.knows = RelationshipProxy(Knows, self.client)
        self.knows.index = indicesE.get_or_create("knows")

        self.james = self.people.create(name="James", age=34)
        self.julie = self.people.create(name="Julie", age=28)
Пример #3
0
 def setUp(self):
     indices = self.vertex_index_proxy(self.index_class,self.resource)
     self.people = NodeProxy(Person,self.resource)
     self.knows = RelationshipProxy(Knows,self.resource)
     self.people.index = indices.get_or_create("people")
     self.james = self.people.create(name="James", age=34)
     self.julie = self.people.create(name="Julie", age=28)
Пример #4
0
    def setUp(self):
        indicesV = self.vertex_index_proxy(self.index_class, self.client)
        indicesE = self.edge_index_proxy(self.index_class, self.client)

        self.people = NodeProxy(Person, self.client)
        self.people.index = indicesV.get_or_create("people")

        self.knows = RelationshipProxy(Knows, self.client)
        self.knows.index = indicesE.get_or_create("knows")

        self.james = self.people.create(name="James", age=34)
        self.julie = self.people.create(name="Julie", age=28)
Пример #5
0
class RelationshipTestCase(BulbsTestCase):
    def setUp(self):
        indices = self.vertex_index_proxy(self.index_class, self.resource)
        self.people = NodeProxy(Person, self.resource)
        self.knows = RelationshipProxy(Knows, self.resource)
        self.people.index = indices.get_or_create("people")
        self.james = self.people.create(name="James", age=34)
        self.julie = self.people.create(name="Julie", age=28)
        #self.relationship = Relationship.create(self.james,"knows",self.julie)

    def test_properties(self):
        self.relationship = self.knows.create(self.james, self.julie)
        assert self.relationship._label == "knows"
        assert self.relationship.outV()._id == self.james.eid
        assert self.relationship.inV()._id == self.julie.eid
Пример #6
0
class RelationshipTestCase(BulbsTestCase):

    def setUp(self):
        indices = self.vertex_index_proxy(self.index_class,self.client)
        self.people = NodeProxy(Person,self.client)
        self.knows = RelationshipProxy(Knows,self.client)
        self.people.index = indices.get_or_create("people")
        self.james = self.people.create(name="James", age=34)
        self.julie = self.people.create(name="Julie", age=28)
        
    def test_properties(self):
        self.relationship = self.knows.create(self.james,self.julie)
        assert self.relationship._label == "knows"
        assert self.relationship.outV()._id == self.james.eid
        assert self.relationship.inV()._id == self.julie.eid