summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-08-31 09:46:34 +0000
committerGerrit Code Review <review@openstack.org>2012-08-31 09:46:34 +0000
commit5cbb9d0ed8505f97c082336e7777c72893338b02 (patch)
tree24748a88bd1e8a76da2a0d77140133611555bdb0 /tests
parent55c1c97b8466a40725bd1cd9de0a3c6db3328534 (diff)
parent454693d250e7085cefef30e1b43608477f34a345 (diff)
downloadoslo-5cbb9d0ed8505f97c082336e7777c72893338b02.tar.gz
oslo-5cbb9d0ed8505f97c082336e7777c72893338b02.tar.xz
oslo-5cbb9d0ed8505f97c082336e7777c72893338b02.zip
Merge "Allow non-string items in the creds dict."
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/test_policy.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unit/test_policy.py b/tests/unit/test_policy.py
index e7f391f..5d77a6f 100644
--- a/tests/unit/test_policy.py
+++ b/tests/unit/test_policy.py
@@ -406,6 +406,13 @@ class CheckTestCase(unittest.TestCase):
self.assertEqual(result, True)
+ def test_generic_boolean(self):
+ result = policy._check_generic(None, "is_admin", "True",
+ {},
+ dict(is_admin=True))
+
+ self.assertEqual(result, True)
+
def test_generic_no_key(self):
result = policy._check_generic(None, "tenant", "%(tenant_id)s",
dict(tenant_id="spam"),