예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
 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)
예제 #4
0
 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)