class TestAIQualityMethods(TestCase): def setUp(self): self.co_master_0 = SMVETreeCOMaseterFactory() self.co_master_1 = SMVETreeCOMaseterFactory(profile=self.co_master_0.profile) def test_set_ai_q_for_all_ais(self): """Setting COMaster AI's q should not affect other AIs in other COMasters""" self.co_master_0.ais.update(q=0) self.co_master_1.ais.update(q=1) value = 1 self.co_master_0.set_ai_qualifier(value=value) values = self.co_master_0.ais.values_list("q", flat=True) for v in values: self.assertEqual(v, value, "q should have been set to %s" % value) values = self.co_master_0.ais.values_list("q", flat=True) for v in values: self.assertEqual(v, 1, "q should not have been modified")
class TestAIQualityMethods(TestCase): def setUp(self): self.co_master_0 = SMVETreeCOMaseterFactory() self.co_master_1 = SMVETreeCOMaseterFactory( profile=self.co_master_0.profile) def test_set_ai_q_for_all_ais(self): '''Setting COMaster AI's q should not affect other AIs in other COMasters''' self.co_master_0.ais.update(q=0) self.co_master_1.ais.update(q=1) value = 1 self.co_master_0.set_ai_qualifier(value=value) values = self.co_master_0.ais.values_list('q', flat=True) for v in values: self.assertEqual(v, value, "q should have been set to %s" % value) values = self.co_master_0.ais.values_list('q', flat=True) for v in values: self.assertEqual(v, 1, "q should not have been modified")
def setUp(self): self.co_master_0 = SMVETreeCOMaseterFactory() self.co_master_1 = SMVETreeCOMaseterFactory( profile=self.co_master_0.profile)
def setUp(self): self.co_master_0 = SMVETreeCOMaseterFactory() self.co_master_1 = SMVETreeCOMaseterFactory(profile=self.co_master_0.profile)