Exemple #1
0
 def test_update_agents(self, mock_update):
     testInstance = Instance()
     testInstance.tmp_agents = ['agent1', 'agent2', 'agent3']
     testInstance.updateAgents()
     mock_update.assert_has_calls(
         [call('agent1'), call('agent2'),
          call('agent3')])
Exemple #2
0
 def test_remove_tmp(self):
     testInst = Instance()
     testInst.createTmpRelations({})
     testInst.tmp_agents = ['agent1', 'agent2']
     testInst.removeTmpRelations()
     with self.assertRaises(AttributeError):
         testInst.tmp_agents
Exemple #3
0
 def test_add_agents(self, mock_add):
     testInstance = Instance()
     testInstance.tmp_agents = ['agent1', 'agent2', 'agent3']
     testInstance.addAgents()
     mock_add.assert_has_calls(
         [call('agent1'), call('agent2'),
          call('agent3')])