summaryrefslogtreecommitdiff
path: root/keystoneclient/tests/v3/test_domains.py
diff options
context:
space:
mode:
Diffstat (limited to 'keystoneclient/tests/v3/test_domains.py')
-rw-r--r--keystoneclient/tests/v3/test_domains.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/keystoneclient/tests/v3/test_domains.py b/keystoneclient/tests/v3/test_domains.py
new file mode 100644
index 0000000..f70c67d
--- /dev/null
+++ b/keystoneclient/tests/v3/test_domains.py
@@ -0,0 +1,33 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# 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 uuid
+
+from keystoneclient.tests.v3 import utils
+from keystoneclient.v3 import domains
+
+
+class DomainTests(utils.TestCase, utils.CrudTests):
+ def setUp(self):
+ super(DomainTests, self).setUp()
+ self.key = 'domain'
+ self.collection_key = 'domains'
+ self.model = domains.Domain
+ self.manager = self.client.domains
+
+ def new_ref(self, **kwargs):
+ kwargs = super(DomainTests, self).new_ref(**kwargs)
+ kwargs.setdefault('enabled', True)
+ kwargs.setdefault('name', uuid.uuid4().hex)
+ return kwargs