def test_run(self): command = Mock(name="command") tab = CronTab(command) assert not command.called tab.run() assert command.called