diff options
author | Doug Hellmann <doug@doughellmann.com> | 2015-07-16 17:46:49 +0000 |
---|---|---|
committer | Doug Hellmann <doug@doughellmann.com> | 2015-07-16 17:46:49 +0000 |
commit | 3d6e396d8c709acb7d6e3de0549b2bda3f75d26d (patch) | |
tree | 1cd59e3c4079d454922a61f6f5905935fe89aa1c /ceilometermiddleware | |
parent | cf9cb86be7b57e95ed3603924f721bbab6ba2816 (diff) | |
download | ceilometermiddleware-3d6e396d8c709acb7d6e3de0549b2bda3f75d26d.tar.gz |
Drop use of 'oslo' namespace package
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names.
The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.
Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.
Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages
Change-Id: I029c3260051aa48cfaae428c096c1ac7b43b2bd2
Diffstat (limited to 'ceilometermiddleware')
-rw-r--r-- | ceilometermiddleware/tests/test_swift.py | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/ceilometermiddleware/tests/test_swift.py b/ceilometermiddleware/tests/test_swift.py index 8407c0c..41aaf58 100644 --- a/ceilometermiddleware/tests/test_swift.py +++ b/ceilometermiddleware/tests/test_swift.py @@ -59,7 +59,7 @@ class FakeRequest(object): self.environ = environ -@mock.patch('oslo.messaging.get_transport', mock.MagicMock()) +@mock.patch('oslo_messaging.get_transport', mock.MagicMock()) class TestSwift(tests_base.TestCase): def setUp(self): @@ -75,7 +75,7 @@ class TestSwift(tests_base.TestCase): app = swift.Swift(FakeApp(), {}) req = FakeRequest('/1.0/account/container/obj', environ={'REQUEST_METHOD': 'GET'}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: resp = app(req.environ, self.start_response) self.assertEqual(["This string is 28 bytes long"], list(resp)) self.assertEqual(1, len(notify.call_args_list)) @@ -97,7 +97,7 @@ class TestSwift(tests_base.TestCase): environ={'REQUEST_METHOD': 'PUT', 'wsgi.input': six.moves.cStringIO('some stuff')}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: list(app(req.environ, self.start_response)) self.assertEqual(1, len(notify.call_args_list)) data = notify.call_args_list[0][0] @@ -117,7 +117,7 @@ class TestSwift(tests_base.TestCase): '/1.0/account/container/obj', environ={'REQUEST_METHOD': 'POST', 'wsgi.input': six.moves.cStringIO('some other stuff')}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: list(app(req.environ, self.start_response)) self.assertEqual(1, len(notify.call_args_list)) data = notify.call_args_list[0][0] @@ -135,7 +135,7 @@ class TestSwift(tests_base.TestCase): app = swift.Swift(FakeApp(body=['']), {}) req = FakeRequest('/1.0/account/container/obj', environ={'REQUEST_METHOD': 'HEAD'}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: list(app(req.environ, self.start_response)) self.assertEqual(1, len(notify.call_args_list)) data = notify.call_args_list[0][0] @@ -152,7 +152,7 @@ class TestSwift(tests_base.TestCase): app = swift.Swift(FakeApp(body=['']), {}) req = FakeRequest('/1.0/account/container/obj', environ={'REQUEST_METHOD': 'BOGUS'}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: list(app(req.environ, self.start_response)) self.assertEqual(1, len(notify.call_args_list)) data = notify.call_args_list[0][0] @@ -168,7 +168,7 @@ class TestSwift(tests_base.TestCase): app = swift.Swift(FakeApp(), {}) req = FakeRequest('/1.0/account/container', environ={'REQUEST_METHOD': 'GET'}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: list(app(req.environ, self.start_response)) self.assertEqual(1, len(notify.call_args_list)) data = notify.call_args_list[0][0] @@ -186,7 +186,7 @@ class TestSwift(tests_base.TestCase): app = swift.Swift(FakeApp(), {}) req = FakeRequest('/1.0/account/container', environ={'REQUEST_METHOD': 'GET'}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: list(app(req.environ, self.start_response)) self.assertEqual(1, len(notify.call_args_list)) data = notify.call_args_list[0][0] @@ -209,7 +209,7 @@ class TestSwift(tests_base.TestCase): headers={'X_VAR1': 'value1', 'X_VAR2': 'value2', 'TOKEN': 'token'}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: list(app(req.environ, self.start_response)) self.assertEqual(1, len(notify.call_args_list)) data = notify.call_args_list[0][0] @@ -235,7 +235,7 @@ class TestSwift(tests_base.TestCase): req = FakeRequest('/1.0/account/container', environ={'REQUEST_METHOD': 'GET'}, headers={'UNICODE': uni}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: list(app(req.environ, self.start_response)) self.assertEqual(1, len(notify.call_args_list)) data = notify.call_args_list[0][0] @@ -257,7 +257,7 @@ class TestSwift(tests_base.TestCase): }) req = FakeRequest('/1.0/account/container', environ={'REQUEST_METHOD': 'GET'}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: list(app(req.environ, self.start_response)) self.assertEqual(1, len(notify.call_args_list)) data = notify.call_args_list[0][0] @@ -275,14 +275,14 @@ class TestSwift(tests_base.TestCase): app = swift.Swift(FakeApp(), {}) req = FakeRequest('/5.0//', environ={'REQUEST_METHOD': 'GET'}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: list(app(req.environ, self.start_response)) self.assertEqual(0, len(notify.call_args_list)) def test_missing_resource_id(self): app = swift.Swift(FakeApp(), {}) req = FakeRequest('/v1/', environ={'REQUEST_METHOD': 'GET'}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: list(app(req.environ, self.start_response)) self.assertEqual(0, len(notify.call_args_list)) @@ -292,7 +292,7 @@ class TestSwift(tests_base.TestCase): app = swift.Swift(FakeApp(body=["test"]), {}) req = FakeRequest('/1.0/account/container', environ={'REQUEST_METHOD': 'GET'}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: resp = list(app(req.environ, self.start_response)) self.assertEqual(0, len(notify.call_args_list)) self.assertEqual(["test"], resp) @@ -301,7 +301,7 @@ class TestSwift(tests_base.TestCase): app = swift.Swift(FakeApp(), {}) req = FakeRequest('/1.0/AUTH_account/container/obj', environ={'REQUEST_METHOD': 'GET'}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: list(app(req.environ, self.start_response)) self.assertEqual(1, len(notify.call_args_list)) data = notify.call_args_list[0][0] @@ -311,7 +311,7 @@ class TestSwift(tests_base.TestCase): app = swift.Swift(FakeApp(), {'reseller_prefix': 'CUSTOM_'}) req = FakeRequest('/1.0/CUSTOM_account/container/obj', environ={'REQUEST_METHOD': 'GET'}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: list(app(req.environ, self.start_response)) self.assertEqual(1, len(notify.call_args_list)) data = notify.call_args_list[0][0] @@ -323,7 +323,7 @@ class TestSwift(tests_base.TestCase): FakeApp(), {'reseller_prefix': 'CUSTOM'}) req = FakeRequest('/1.0/CUSTOM_account/container/obj', environ={'REQUEST_METHOD': 'GET'}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: list(app(req.environ, self.start_response)) self.assertEqual(1, len(notify.call_args_list)) data = notify.call_args_list[0][0] @@ -338,7 +338,7 @@ class TestSwift(tests_base.TestCase): req = FakeRequest('/1.0/CUSTOM_account/container/obj', environ={'REQUEST_METHOD': 'GET', proj_attr: proj}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: list(app(req.environ, self.start_response)) self.assertEqual(calls, len(notify.call_args_list)) @@ -352,7 +352,7 @@ class TestSwift(tests_base.TestCase): req = FakeRequest('/1.0/CUSTOM_account/container/obj', environ={'REQUEST_METHOD': 'GET', proj_attr: proj}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: list(app(req.environ, self.start_response)) self.assertEqual(calls, len(notify.call_args_list)) @@ -361,7 +361,7 @@ class TestSwift(tests_base.TestCase): FakeApp(), {'reseller_prefix': 'CUSTOM'}) req = FakeRequest('/1.0/CUSTOM/container/obj', environ={'REQUEST_METHOD': 'GET'}) - with mock.patch('oslo.messaging.Notifier.info') as notify: + with mock.patch('oslo_messaging.Notifier.info') as notify: list(app(req.environ, self.start_response)) data = notify.call_args_list[0][0] self.assertIsNot(0, len(data[2]['target']['id'])) |