class FixturesTestCases(unittest.TestCase): """class for fixtures tests""" def setUp(self): # Mocks self.fixture1 = MagicMock() self.fixture2 = MagicMock() self.fixtures = Fixtures([ self.fixture1, self.fixture2, ]) def test_set_up_calls_each_fixture_set_up(self): """stuff""" self.fixtures.set_up() self.assertTrue(self.fixture1.set_up.called) self.assertTrue(self.fixture2.set_up.called) def test_tear_down_calls_each_fixture_tear_down(self): """stuff""" self.fixtures.tear_down() self.assertTrue(self.fixture1.tear_down.called) self.assertTrue(self.fixture2.tear_down.called)
def setUp(self): # Mocks self.fixture1 = MagicMock() self.fixture2 = MagicMock() self.fixtures = Fixtures([ self.fixture1, self.fixture2, ])