def test_init(self): " Test that init loads the configuration. " a = SimpleCommand() c = Crawler([a, a, a], {'number_threads': 0}, {}) self.assertEquals(c.route, [a,a,a]) self.assertEquals(c.config['number_threads'], 0) c._shutdown()
def test_blank_config_init(self): " Test that init method with blank config. " c = Crawler([], {}, {}) self.assertEquals(c.route, []) c._shutdown()