Esempio n. 1
0
 def test_03(self):
     print("test_03")
     """[summary]
         Create a third behavior, of the different type as the 1st (store the external_id)
         Validation: Database accuses 3 behavior
     """
     behMec = BehaviorAO.create_behavior("MECHANICAL")
     assert behMec.external_id is not None
     assert BehaviorDB.objects.count() == 3  # pylint: disable=no-member
     for idx in self.els2:
         behMec.add(self.elAO[idx])
     behMec.save()
     assert len(behMec) == len(self.els2)
     self.__class__.eidMech = behMec.external_id
Esempio n. 2
0
 def test_01(self):
     """[summary]
         Create a behavior (store the external_id)
         Validation: Database accuses 1 behavior
     """
     print("test_01")
     beh1 = BehaviorAO.create_behavior("LUDIC")
     assert beh1.external_id is not None
     assert BehaviorDB.objects.count() == 1  # pylint: disable=no-member
     for idx in self.els1:
         beh1.add(self.elAO[idx])
     beh1.save()
     assert len(beh1) == len(self.els1)
     self.__class__.eid1 = beh1.external_id
Esempio n. 3
0
 def test_02(self):
     print("test_02")
     """[summary]
         Create a second behavior, of the same type as the 1st (store the external_id)
         Validation: Database accuses 2 behavior
     """
     beh2 = BehaviorAO.create_behavior("LUDIC")
     assert beh2.external_id is not None
     assert BehaviorDB.objects.count() == 2  # pylint: disable=no-member
     for idx in self.els2:
         beh2.add(self.elAO[idx])
     beh2.save()
     assert len(beh2) == len(self.els2)
     self.__class__.eid2 = beh2.external_id
     pass