Updating tests for new storage config code
authorChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 21 Aug 2011 20:14:45 +0000 (15:14 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 21 Aug 2011 20:14:45 +0000 (15:14 -0500)
mediagoblin/tests/test_mgoblin_app.ini
mediagoblin/tests/test_storage.py

index 7716e9ca244f3ce034bdd6be72d0419f4260ce6d..0109d75181c1dfc3c7ef1343d33758830ffb2930 100644 (file)
@@ -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
index 1800c29de887bbdaed75b1aaead76d814c598cf3..45cb35c1b85ee61d0d5873b93fdcb9b55a0e92a8 100644 (file)
@@ -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