summaryrefslogtreecommitdiffstats
path: root/tests/test_backend.py
diff options
context:
space:
mode:
authorgalstrom21 <jshepher@rackspace.com>2013-06-12 12:39:48 -0500
committergalstrom21 <jshepher@rackspace.com>2013-06-12 12:45:47 -0500
commit716f4027ee57c146f3b472f1edae0c11503240c3 (patch)
tree91032232593d8740ea11721c09bbeea49d7864c7 /tests/test_backend.py
parent6111bc9dfe374a0dae7839a325246df8abfb5aa3 (diff)
downloadkeystone-716f4027ee57c146f3b472f1edae0c11503240c3.tar.gz
keystone-716f4027ee57c146f3b472f1edae0c11503240c3.tar.xz
keystone-716f4027ee57c146f3b472f1edae0c11503240c3.zip
Add checks to test if enabled is bool
fixes: bug #1167593 Change-Id: Ie18fa17f16383f31d8aa083e69fa501d80eb4553
Diffstat (limited to 'tests/test_backend.py')
-rw-r--r--tests/test_backend.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/test_backend.py b/tests/test_backend.py
index 57f3315c..9e506928 100644
--- a/tests/test_backend.py
+++ b/tests/test_backend.py
@@ -1553,7 +1553,19 @@ class IdentityTests(object):
'fake1',
user)
- def test_create_user_invalid_enabled_type(self):
+ def test_create_project_invalid_enabled_type_string(self):
+ project = {'id': uuid.uuid4().hex,
+ 'name': uuid.uuid4().hex,
+ 'domain_id': DEFAULT_DOMAIN_ID,
+ # invalid string value
+ 'enabled': "true"}
+ self.assertRaises(exception.ValidationError,
+ self.identity_man.create_project,
+ EMPTY_CONTEXT,
+ project['id'],
+ project)
+
+ def test_create_user_invalid_enabled_type_string(self):
user = {'id': uuid.uuid4().hex,
'name': uuid.uuid4().hex,
'domain_id': DEFAULT_DOMAIN_ID,
@@ -1561,7 +1573,8 @@ class IdentityTests(object):
# invalid string value
'enabled': "true"}
self.assertRaises(exception.ValidationError,
- self.identity_man.create_user, EMPTY_CONTEXT,
+ self.identity_man.create_user,
+ EMPTY_CONTEXT,
user['id'],
user)