From: Christopher Allan Webber Date: Sun, 21 Aug 2011 20:14:45 +0000 (-0500) Subject: Updating tests for new storage config code X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=63c9a0c766559ddd9bea79a03499040a0f3f9853;p=mediagoblin.git Updating tests for new storage config code --- diff --git a/mediagoblin/tests/test_mgoblin_app.ini b/mediagoblin/tests/test_mgoblin_app.ini index 7716e9ca..0109d751 100644 --- a/mediagoblin/tests/test_mgoblin_app.ini +++ b/mediagoblin/tests/test_mgoblin_app.ini @@ -1,7 +1,4 @@ [mediagoblin] -queuestore_base_dir = %(here)s/test_user_dev/media/queue -publicstore_base_dir = %(here)s/test_user_dev/media/public -publicstore_base_url = /mgoblin_media/ direct_remote_path = /mgoblin_static/ email_sender_address = "notice@mediagoblin.example.org" email_debug_mode = true @@ -15,5 +12,12 @@ tags_max_length = 50 # mediagoblin.init.celery.from_celery celery_setup_elsewhere = true +[storage:publicstore] +base_dir = %(here)s/test_user_dev/media/public +base_url = /mgoblin_media/ + +[storage:queuestore] +queuestore_base_dir = %(here)s/test_user_dev/media/queue + [celery] celery_always_eager = true diff --git a/mediagoblin/tests/test_storage.py b/mediagoblin/tests/test_storage.py index 1800c29d..45cb35c1 100644 --- a/mediagoblin/tests/test_storage.py +++ b/mediagoblin/tests/test_storage.py @@ -60,23 +60,20 @@ class FakeRemoteStorage(storage.BasicFileStorage): def test_storage_system_from_config(): this_storage = storage.storage_system_from_config( - {'somestorage_base_url': 'http://example.org/moodia/', - 'somestorage_base_dir': '/tmp/', - 'somestorage_garbage_arg': 'garbage_arg', - 'garbage_arg': 'trash'}, - 'somestorage') + {'base_url': 'http://example.org/moodia/', + 'base_dir': '/tmp/', + 'garbage_arg': 'garbage_arg', + 'garbage_arg': 'trash'}) assert this_storage.base_url == 'http://example.org/moodia/' assert this_storage.base_dir == '/tmp/' assert this_storage.__class__ is storage.BasicFileStorage this_storage = storage.storage_system_from_config( - {'somestorage_foobie': 'eiboof', - 'somestorage_blech': 'hcelb', - 'somestorage_garbage_arg': 'garbage_arg', - 'garbage_arg': 'trash', - 'somestorage_storage_class': - 'mediagoblin.tests.test_storage:FakeStorageSystem'}, - 'somestorage') + {'foobie': 'eiboof', + 'blech': 'hcelb', + 'garbage_arg': 'garbage_arg', + 'storage_class': + 'mediagoblin.tests.test_storage:FakeStorageSystem'}) assert this_storage.foobie == 'eiboof' assert this_storage.blech == 'hcelb' assert this_storage.__class__ is FakeStorageSystem