Fix gate-watcher-python27-ubuntu-xenial FAILURE
There is no exc.HTTPUnauthorized in monascaclient now. Change-Id: I1942b32d4581d1770819aa083a640f394c17d25a Closes-Bug: #1706858
This commit is contained in:
@@ -15,7 +15,6 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from monascaclient import exc
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
|
|
||||||
@@ -94,8 +93,7 @@ class TestMonascaHelper(base.BaseTestCase):
|
|||||||
['2016-07-29T12:55:36.000Z', 0.8, {}]],
|
['2016-07-29T12:55:36.000Z', 0.8, {}]],
|
||||||
'name': 'cpu.percent'}]
|
'name': 'cpu.percent'}]
|
||||||
|
|
||||||
monasca.metrics.list_measurements.side_effect = [
|
monasca.metrics.list_measurements.side_effect = [expected_result]
|
||||||
exc.HTTPUnauthorized, expected_result]
|
|
||||||
mock_monasca.return_value = monasca
|
mock_monasca.return_value = monasca
|
||||||
helper = monasca_helper.MonascaHelper()
|
helper = monasca_helper.MonascaHelper()
|
||||||
val = helper.statistics_list(meter_name="cpu.percent", dimensions={})
|
val = helper.statistics_list(meter_name="cpu.percent", dimensions={})
|
||||||
|
|||||||
Reference in New Issue
Block a user