def save(self):
        tmp_path = self.path + '.tmp'
        with open(tmp_path, 'w') as f:
            f.write(json.dumps(self.body_labels.items()))
        os.rename(tmp_path, self.path)
def test_can_encode_relationship_with_alternative_names(self):
        a = Node("Person", nom=u"Aimée")
        b = Node("Person", nom=u"Baptiste")
        ab = KNOWS_FR(a, b)
        encoded = cypher_repr(ab, related_node_template=u"{property.nom}")
        self.assertEqual(u"(Aimée)-[:CONNAÎT {}]->(Baptiste)", encoded)