Exemplo n.º 1
0
 def test_05_get_relations(self):
     """
     Test that get_relations returns the relations parameter of the OdooClass object
     :return:
     """
     test_oc = OdooClass('name')
     test_oc.relations = ['relation']
     self.assertListEqual(['relation'], test_oc.get_relations())
Exemplo n.º 2
0
 def test_07_add_relation(self):
     """
     Test that OdooRelation objects are added correctly using add_relation method
     :return:
     """
     test_oc = OdooClass('name')
     test_oc.add_relation('name', 'type', 'model')
     relations = test_oc.get_relations()
     self.assertEqual(len(relations), 1)
     self.assertIsInstance(relations[0], OdooRelation)