def setUp(self): self.caboose = Caboose() self.config_parser = MockConfigParser() self.caboose.set_config_parser(self.config_parser) self.stat_runner_factory = MockStatRunnerFactory() self.caboose.set_stat_runner_factory(self.stat_runner_factory)
class CabooseTests(TestCase): def setUp(self): self.caboose = Caboose() self.config_parser = MockConfigParser() self.caboose.set_config_parser(self.config_parser) self.stat_runner_factory = MockStatRunnerFactory() self.caboose.set_stat_runner_factory(self.stat_runner_factory) def test_set_configfile_calls_config_parser(self): self.caboose.set_configfile('hello/there.conf') eq_('hello/there.conf', self.config_parser.last_config_file)