diff options
author | John Dickinson <me@not.mn> | 2015-04-14 08:10:41 -0700 |
---|---|---|
committer | John Dickinson <me@not.mn> | 2015-04-14 08:57:15 -0700 |
commit | e910f7e07d05dd2c6ada939d5704c3d4944c24b0 (patch) | |
tree | 250b33237ccbc07bf4ef5895439a0e8cac2fec11 /test/unit/common/test_wsgi.py | |
parent | dd9d97458ea007024220a78dba8dd663e8b425d7 (diff) | |
parent | 8f5d4d24557887b4691fc219cefbc30e478bf7ed (diff) | |
download | swift-e910f7e07d05dd2c6ada939d5704c3d4944c24b0.tar.gz |
Merge EC feature into master
Co-Authored-By: Alistair Coles <alistair.coles@hp.com>
Co-Authored-By: Thiago da Silva <thiago@redhat.com>
Co-Authored-By: John Dickinson <me@not.mn>
Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com>
Co-Authored-By: Tushar Gohad <tushar.gohad@intel.com>
Co-Authored-By: Paul Luse <paul.e.luse@intel.com>
Co-Authored-By: Samuel Merritt <sam@swiftstack.com>
Co-Authored-By: Christian Schwede <christian.schwede@enovance.com>
Co-Authored-By: Yuan Zhou <yuan.zhou@intel.com>
Change-Id: I002787f558781bd4d884129b127bc9f108ea9ec4
Diffstat (limited to 'test/unit/common/test_wsgi.py')
-rw-r--r-- | test/unit/common/test_wsgi.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/unit/common/test_wsgi.py b/test/unit/common/test_wsgi.py index 67142decd..279eb8624 100644 --- a/test/unit/common/test_wsgi.py +++ b/test/unit/common/test_wsgi.py @@ -156,6 +156,27 @@ class TestWSGI(unittest.TestCase): logger.info('testing') self.assertEquals('proxy-server', log_name) + @with_tempdir + def test_loadapp_from_file(self, tempdir): + conf_path = os.path.join(tempdir, 'object-server.conf') + conf_body = """ + [app:main] + use = egg:swift#object + """ + contents = dedent(conf_body) + with open(conf_path, 'w') as f: + f.write(contents) + app = wsgi.loadapp(conf_path) + self.assertTrue(isinstance(app, obj_server.ObjectController)) + + def test_loadapp_from_string(self): + conf_body = """ + [app:main] + use = egg:swift#object + """ + app = wsgi.loadapp(wsgi.ConfigString(conf_body)) + self.assertTrue(isinstance(app, obj_server.ObjectController)) + def test_init_request_processor_from_conf_dir(self): config_dir = { 'proxy-server.conf.d/pipeline.conf': """ |