From 67504c595a62cb8ab3e5bd0399f0d4521fb5d283 Mon Sep 17 00:00:00 2001 From: gholt Date: Wed, 3 Nov 2010 09:04:44 -0700 Subject: [PATCH] PEPy fixes --- swift/common/middleware/domain_remap.py | 4 ++-- test/unit/common/middleware/test_domain_remap.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/swift/common/middleware/domain_remap.py b/swift/common/middleware/domain_remap.py index f9fee98208..e55394d84b 100644 --- a/swift/common/middleware/domain_remap.py +++ b/swift/common/middleware/domain_remap.py @@ -21,10 +21,10 @@ class DomainRemapMiddleware(object): """ Middleware that translates container and account parts of a domain to path parameters that the proxy server understands. - + container.account.storageurl/object gets translated to container.account.storageurl/path_root/account/container/object - + account.storageurl/path_root/container/object gets translated to account.storageurl/path_root/account/container/object """ diff --git a/test/unit/common/middleware/test_domain_remap.py b/test/unit/common/middleware/test_domain_remap.py index 841680be38..a6beb561fb 100644 --- a/test/unit/common/middleware/test_domain_remap.py +++ b/test/unit/common/middleware/test_domain_remap.py @@ -19,13 +19,17 @@ from webob import Request from swift.common.middleware import domain_remap + class FakeApp(object): + def __call__(self, env, start_response): return env['PATH_INFO'] + def start_response(*args): pass + class TestDomainRemap(unittest.TestCase): def setUp(self):