summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-07-02 21:34:28 +0000
committerGerrit Code Review <review@openstack.org>2013-07-02 21:34:28 +0000
commit085dd69acdd5c8c216271dc8890c4107363190fb (patch)
treef9693cd5bc3e46547d18794b232534d20a886e53
parent78649a52d90a63117f3213107b826cc561cef419 (diff)
parentb21fc56486843ab301aaa5acf55c164003d2c6a1 (diff)
downloadoslo-085dd69acdd5c8c216271dc8890c4107363190fb.zip
oslo-085dd69acdd5c8c216271dc8890c4107363190fb.tar.gz
oslo-085dd69acdd5c8c216271dc8890c4107363190fb.tar.xz
Merge "Fix bad default for show_deleted"
-rw-r--r--openstack/common/context.py2
-rw-r--r--tests/unit/test_context.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/openstack/common/context.py b/openstack/common/context.py
index 3899c2c..81772bc 100644
--- a/openstack/common/context.py
+++ b/openstack/common/context.py
@@ -61,7 +61,7 @@ class RequestContext(object):
'request_id': self.request_id}
-def get_admin_context(show_deleted="no"):
+def get_admin_context(show_deleted=False):
context = RequestContext(None,
tenant=None,
is_admin=True,
diff --git a/tests/unit/test_context.py b/tests/unit/test_context.py
index 0db7aaa..2f9a3de 100644
--- a/tests/unit/test_context.py
+++ b/tests/unit/test_context.py
@@ -24,3 +24,7 @@ class ContextTest(utils.BaseTestCase):
def test_context(self):
ctx = context.RequestContext()
self.assertTrue(ctx)
+
+ def test_admin_context_show_deleted_flag_default(self):
+ ctx = context.get_admin_context()
+ self.assertFalse(ctx.show_deleted)