Ejemplo n.º 1
0
 def test_relationship_property_map(self):
     rel = RelationshipModel()
     self.assertDictEqual(rel.property_map, {})
     rel.property_map = dict(x=1)
     self.assertDictEqual(rel.property_map, dict(x=1))
Ejemplo n.º 2
0
 def test_relationship_create_relationship(self):
     rel = RelationshipModel(is_list=True, name='blah')
     self.assertIsInstance(rel.relationship, ListRelationship)
     rel.is_list = False
     self.assertIsInstance(rel.relationship, Relationship)
     self.assertFalse(isinstance(rel, ListRelationship))
Ejemplo n.º 3
0
 def test_relationship_query_args(self):
     rel = RelationshipModel()
     self.assertListEqual(rel.query_args, [])
     rel.query_args = ['first']
     self.assertEqual(rel._query_args, '["first"]')