Beispiel #1
0
 def test_remote_rel_changes_can_be_pulled(self):
     batch = Batch(self.graph)
     a = batch.create_node()
     b = batch.create_node()
     ab = batch.create_rel(a, b, "KNOWS")
     result = batch.submit()
     alice = next(result)
     bob = next(result)
     alice_bob = next(result)
     local = Rel("KNOWS")
     local.bind(self.graph, id=alice_bob._id)
     local.pull()
     assert local.type == alice_bob.type
     assert local.properties == alice_bob.properties
Beispiel #2
0
 def test_remote_rel_changes_can_be_pulled(self):
     batch = Batch(self.graph)
     a = batch.create_node()
     b = batch.create_node()
     ab = batch.create_rel(a, b, "KNOWS")
     result = batch.submit()
     alice = next(result)
     bob = next(result)
     alice_bob = next(result)
     local = Rel("KNOWS")
     local.bind(self.graph, id=alice_bob._id)
     local.pull()
     assert local.type == alice_bob.type
     assert local.properties == alice_bob.properties
Beispiel #3
0
 def test_local_rel_changes_can_be_pushed(self):
     batch = Batch(self.graph)
     a = batch.create_node()
     b = batch.create_node()
     ab = batch.create_rel(a, b, "KNOWS")
     result = batch.submit()
     alice = next(result)
     bob = next(result)
     alice_bob = next(result)
     local = Rel("KNOWS", since=1999)
     local.bind(self.graph, id=alice_bob._id)
     local.push()
     remote = Batch.single(self.graph, Batch.get_rel, local._id)
     assert remote.type == local.type
     assert remote.properties == local.properties
Beispiel #4
0
 def test_local_rel_changes_can_be_pushed(self):
     batch = Batch(self.graph)
     a = batch.create_node()
     b = batch.create_node()
     ab = batch.create_rel(a, b, "KNOWS")
     result = batch.submit()
     alice = next(result)
     bob = next(result)
     alice_bob = next(result)
     local = Rel("KNOWS", since=1999)
     local.bind(self.graph, id=alice_bob._id)
     local.push()
     remote = Batch.single(self.graph, Batch.get_rel, local._id)
     assert remote.type == local.type
     assert remote.properties == local.properties