7 Commits

Author SHA1 Message Date
Victor Stinner
72c501454e Use unittest.mock on Python 3
The mock module has been added to Python 3.3 as unittest.mock.

The third party mock module doesn't seem to be maintained anymore: the
last commit was in April 2013.

unittest.mock is more recent, has less bugs and is compatible with
Python 3.4. There are bugs on Python 3 in the third party mock module,
examples:

* https://code.google.com/p/mock/issues/detail?id=225
* https://code.google.com/p/mock/issues/detail?id=234

Oslo Messaging hits these issues when running tests on Python 3.4.

Import oslotest to setup six.moves for mock.

Change-Id: Ic160101695cea67eb9bbbfcaddb8d3dac64e6804
2015-04-16 00:07:48 +02:00
Doug Hellmann
ee31a84719 Update Oslo imports to remove namespace package
Change-Id: I4ec9b2a310471e4e07867073e9577731ac34027d
Blueprint: drop-namespace-packages
2015-01-21 21:09:33 -05:00
Doug Hellmann
e55a83e832 Move files out of the namespace package
Move the public API out of oslo.messaging to oslo_messaging. Retain
the ability to import from the old namespace package for backwards
compatibility for this release cycle.

bp/drop-namespace-packages

Co-authored-by: Mehdi Abaakouk <mehdi.abaakouk@enovance.com>
Change-Id: Ia562010c152a214f1c0fed767c82022c7c2c52e7
2015-01-12 12:50:41 -05:00
Victor Stinner
0844037fad Add an optional executor callback to dispatcher
The callback will be used in the new aiogreen executor to support
trollius coroutines.

The change includes an unit test.

Change-Id: I556b112371bec2ec29cea4dc254bb3f9c6d2c07a
2014-12-03 01:45:17 +01:00
Mehdi Abaakouk
30e0aea877 Notification listener pools
We can now set the pool name of a notification listener
to create multiple groups/pools of listeners consuming notifications
and that each group/pool only receives one copy of each notification.

The AMQP implementation of that is to set queue_name with the pool name.

Implements blueprint notification-listener-pools
Closes-bug: #1356226

Change-Id: I8dc0549f5550f684a261c78c58737b798fcdd656
2014-11-14 10:20:18 +01:00
Julien Danjou
a9ec73f38d Switch to oslo.utils
Change-Id: I262e98d8d03acbe2ff8fee5d607279a669a89e34
2014-08-27 14:14:00 +02:00
Boris Pavlovic
3f9fc44bc6 Fix structure of unit tests in oslo.messaging (part 1)
Even in case of libraries and when they are not big like nova.
It is better to use next rules:

1) structure of tests directory is the same as a root of project
Tests directory will be well organized, and it will be simple to find
where to write tests

2) names for end modules should be test_<name_of_testing_module>.py

Change-Id: Ie13d1b709e863f6a9babaaa2bf1e042ef9251671
2014-06-25 12:20:36 +04:00