def test_checkers_are_called(self): upgrader = UpgradeManager(**self.default_args()) checkers_mock = upgrader._checkers upgrader.before_upgrade() for checker_mock in checkers_mock: self.called_once(checker_mock.check)
def test_before_upgrade_is_called(self): upgrader = UpgradeManager(**self.default_args()) upgrader.before_upgrade = mock.Mock() upgrader.run() self.called_once(upgrader.before_upgrade)