Debian Codegraph @

mistralclient/tests/unit/v2/base.py

raw symbols SCIP
1 # Copyright 2014 - Mirantis, Inc.
2 # Copyright 2015 - StackStorm, Inc.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 from unittest import mock
17
18 from mistralclient.api.v2 import client
19 from mistralclient.tests.unit import base
20
21
22 class BaseClientV2Test(base.BaseClientTest):
23
24 TEST_URL = 'http://mistral.example.com'
25
26 def setUp(self):
27 super(BaseClientV2Test, self).setUp()
28
29 with mock.patch(
30 'mistralclient.auth.keystone.KeystoneAuthHandler.authenticate',
31 return_value={'session': None}):
32 self._client = client.Client(project_name="test",
33 mistral_url=self.TEST_URL)
34 self.workbooks = self._client.workbooks
35 self.executions = self._client.executions
36 self.tasks = self._client.tasks
37 self.workflows = self._client.workflows
38 self.environments = self._client.environments
39 self.action_executions = self._client.action_executions
40 self.actions = self._client.actions
41 self.members = self._client.members