Debian Codegraph @

keystoneclient/tests/unit/v3/test_regions.py

raw symbols SCIP
1 # Licensed under the Apache License, Version 2.0 (the "License"); you may
2 # not use this file except in compliance with the License. You may obtain
3 # a copy of the License at
4 #
5 # http://www.apache.org/licenses/LICENSE-2.0
6 #
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 # License for the specific language governing permissions and limitations
11 # under the License.
12
13
14 import uuid
15
16
17 from keystoneclient.tests.unit.v3 import utils
18 from keystoneclient.v3 import regions
19
20
21 class RegionTests(utils.ClientTestCase, utils.CrudTests):
22 def setUp(self):
23 super(RegionTests, self).setUp()
24 self.key = 'region'
25 self.collection_key = 'regions'
26 self.model = regions.Region
27 self.manager = self.client.regions
28
29 def new_ref(self, **kwargs):
30 kwargs = super(RegionTests, self).new_ref(**kwargs)
31 kwargs.setdefault('enabled', True)
32 kwargs.setdefault('id', uuid.uuid4().hex)
33 return kwargs
34
35 def test_update_enabled_defaults_to_none(self):
36 super(RegionTests, self).test_update(
37 req_ref={'description': uuid.uuid4().hex})