deb-mistral/mistral/__init__.py
Renat Akhmerov 95b4cd5e36 Fixing environment tests
* As a side effect the bug related to oslo.messaging (AttributeError: ...)
  was also fixed by moving monkey patching to mistral/__init__.py. Monkey
  patching has to be done before importing oslo.messaging. Details can be
  found at https://bugs.launchpad.net/oslo.messaging/+bug/1288878
* Refactored environment engine tests
* Refactored and fixed environment API tests (there was a number of
  fragile dict string representation comparisons)

Closes-Bug: #1337705

Change-Id: Id725570dfc7148f010647c4b2487882174b0c56e
2015-01-21 16:47:06 +06:00

26 lines
783 B
Python

# Copyright 2015 - Mirantis, Inc.
#
# 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.
import eventlet
import sys
eventlet.monkey_patch(
os=True,
select=True,
socket=True,
thread=False if '--use-debugger' in sys.argv else True,
time=True
)