def test_amqp_changed_relation_data(self, configs): configs.complete_contexts = MagicMock() configs.complete_contexts.return_value = ['amqp'] configs.write = MagicMock() relations.amqp_changed() self.assertEqual([call('/etc/glance/glance-api.conf')], configs.write.call_args_list) self.assertFalse(self.juju_log.called)
def test_amqp_changed_relation_data(self, configs): configs.complete_contexts = MagicMock() configs.complete_contexts.return_value = ['amqp'] configs.write = MagicMock() relations.amqp_changed() self.assertEquals([call('/etc/glance/glance-api.conf')], configs.write.call_args_list) self.assertFalse(self.juju_log.called)
def test_amqp_changed_missing_relation_data(self, configs): configs.complete_contexts = MagicMock() configs.complete_contexts.return_value = [] relations.amqp_changed() self.assertTrue(self.juju_log.called)