From eb9251173c30013616ae109b5b945e87e5347e18 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Mon, 26 Jan 2015 21:46:02 +0000 Subject: [PATCH] Expose _impl_test for designate The previous attempt to do this in Ide40b293c9b9c76aae094950720cead4179ea883 created a new module oslo/messaging/notify/_impl_test.py which imported the symbols from oslo_messaging/notify/_impl_test.py. That doesn't actually work, because the functions to reset the notifications modify the copy of the symbol in the oslo_messaging package, but the designate tests are still looking at the copy in oslo/messaging. This change imports a copy of the module from oslo_messaging in the oslo/messaging namespace to make certain that the same module object, and therefore the same global data structure, is used no matter which path the code is accessed. The designate team still needs to fix their fixture, but this will let us release oslo.messaging without breaking their tests in the mean time. Partial-Bug: #1412812 Change-Id: I629ac57ae1e74bb07e5e98ee2fbc21f8421c3c24 --- oslo/messaging/notify/__init__.py | 1 + oslo/messaging/notify/_impl_test.py | 13 ------------- 2 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 oslo/messaging/notify/_impl_test.py diff --git a/oslo/messaging/notify/__init__.py b/oslo/messaging/notify/__init__.py index c5032db83..9de833189 100644 --- a/oslo/messaging/notify/__init__.py +++ b/oslo/messaging/notify/__init__.py @@ -25,3 +25,4 @@ from .listener import * from .log_handler import * from .logger import * from .dispatcher import NotificationResult +from oslo_messaging.notify import _impl_test diff --git a/oslo/messaging/notify/_impl_test.py b/oslo/messaging/notify/_impl_test.py deleted file mode 100644 index 4e3caf77d..000000000 --- a/oslo/messaging/notify/_impl_test.py +++ /dev/null @@ -1,13 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -from oslo_messaging.notify._impl_test import * # noqa