Beispiel #1
0
 def test_read_channel_config_invalid_path(self):
     self.fake_config.set('ircbot', 'channel_config', 'fake_path.yaml')
     with self.assertRaises(bot.ElasticRecheckException) as exc:
         bot._main([], er_conf.Config(config_obj=self.fake_config))
     raised_exc = exc.exception
     error_msg = "Unable to read layout config file at fake_path.yaml"
     self.assertEqual(str(raised_exc), error_msg)
Beispiel #2
0
 def test_read_channel_config_invalid_path(self):
     self.fake_config.set('ircbot', 'channel_config', 'fake_path.yaml')
     with self.assertRaises(bot.ElasticRecheckException) as exc:
         bot._main([], self.fake_config)
     raised_exc = exc.exception
     error_msg = "Unable to read layout config file at fake_path.yaml"
     self.assertEqual(str(raised_exc), error_msg)
Beispiel #3
0
 def test_read_channel_config_not_specified(self):
     self.fake_config.set('ircbot', 'channel_config', None)
     with self.assertRaises(bot.ElasticRecheckException) as exc:
         bot._main([], er_conf.Config(config_obj=self.fake_config))
     raised_exc = exc.exception
     self.assertEqual(str(raised_exc), "Channel Config must be specified "
                      "in config file.")
Beispiel #4
0
 def test_read_channel_config_not_specified(self):
     self.fake_config.set('ircbot', 'channel_config', None)
     with self.assertRaises(bot.ElasticRecheckException) as exc:
         bot._main([], self.fake_config)
     raised_exc = exc.exception
     self.assertEqual(str(raised_exc), "Channel Config must be specified "
                      "in config file.")