def test_amqp_relation_broken(self, configs, cell_joined): configs.write = MagicMock() self.relation_ids.return_value = ['nova-cell-api/0'] hooks.relation_broken() self.assertTrue(configs.write_all.called) cell_joined.assert_called_with(rid='nova-cell-api/0')