class TestAgent(TestCase): def setUp(self): self.agent = Agent(1) def test_init(self): self.assertEqual(self.agent.id, 1) def test_tick(self): messages, cmd = self.agent.tick([], None) self.assertEqual([], messages) self.assertIsInstance(cmd, Done)
def __init__(self, id, to): Agent.__init__(self, id) self.tickNumber = -1 self.to = to
def setUp(self): self.agent = Agent(1)