Fix errors in collection views
[mediagoblin.git] / mediagoblin / tests / test_tags.py
index 583c1a55d1e9113478fb9073614bb3fa06258c77..ccb930854047fe71b77621eec5ba802fb4457656 100644 (file)
@@ -1,5 +1,5 @@
 # GNU MediaGoblin -- federated, autonomous media hosting
-# Copyright (C) 2011 MediaGoblin contributors.  See AUTHORS.
+# Copyright (C) 2011, 2012 MediaGoblin contributors.  See AUTHORS.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU Affero General Public License as published by
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-from mediagoblin.tests.tools import setup_fresh_app
-from mediagoblin import mg_globals
+from mediagoblin.tests.tools import get_app
 from mediagoblin.tools import text
 
-@setup_fresh_app
-def test_list_of_dicts_conversion(test_app):
+def test_list_of_dicts_conversion():
     """
     When the user adds tags to a media entry, the string from the form is
     converted into a list of tags, where each tag is stored in the database
     as a dict. Each tag dict should contain the tag's name and slug. Another
     function performs the reverse operation when populating a form to edit tags.
     """
+    test_app = get_app(dump_old_app=False)
     # Leading, trailing, and internal whitespace should be removed and slugified
     assert text.convert_to_tag_list_of_dicts('sleep , 6    AM, chainsaw! ') == [
                               {'name': u'sleep', 'slug': u'sleep'},