Refactored DE and Applier to use oslo.service

In this PS, I have refactored the Decision Engine and the Applier
to use the oslo service utility.

Change-Id: If29158cc9b5e5e50f6c69d67c232cceeb07084f2
Closes-Bug: #1541850
This commit is contained in:
Vincent Françoise
2016-03-18 10:22:46 +01:00
parent a9e7251d0d
commit eb861f86ab
16 changed files with 286 additions and 286 deletions

View File

@@ -13,6 +13,7 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from watcher.common import utils
@@ -41,7 +42,7 @@ class TestAuditEndpoint(DbTestCase):
audit_uuid = utils.generate_uuid()
audit_handler = DefaultAuditHandler(mock.MagicMock())
endpoint = AuditEndpoint(audit_handler, max_workers=2)
endpoint = AuditEndpoint(audit_handler)
with mock.patch.object(DefaultAuditHandler, 'execute') as mock_call:
mock_call.return_value = 0
@@ -54,7 +55,7 @@ class TestAuditEndpoint(DbTestCase):
mock_collector.return_value = FakerModelCollector()
audit_uuid = utils.generate_uuid()
audit_handler = DefaultAuditHandler(mock.MagicMock())
endpoint = AuditEndpoint(audit_handler, max_workers=2)
endpoint = AuditEndpoint(audit_handler)
with mock.patch.object(DefaultAuditHandler, 'execute') \
as mock_call: