skip openid test if python-openid isn't installed
[mediagoblin.git] / mediagoblin / tests / test_tags.py
index a05831c9fa7ca03151702b93d27560bf52d605ed..e25cc283fe1184b19d9c53dd8c0dd940384e2f70 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.tools import text
 
-@setup_fresh_app
 def test_list_of_dicts_conversion(test_app):
     """
     When the user adds tags to a media entry, the string from the form is
@@ -39,11 +36,4 @@ def test_list_of_dicts_conversion(test_app):
     # Make sure converting the list of dicts to a string works
     assert text.media_tags_as_string([{'name': u'yin', 'slug': u'yin'},
                                       {'name': u'yang', 'slug': u'yang'}]) == \
-                                      u'yin,yang'
-
-    # If the tag delimiter is a space then we expect different results
-    mg_globals.app_config['tags_delimiter'] = u' '
-    assert text.convert_to_tag_list_of_dicts('unicorn ceramic nazi') == [
-                                       {'name': u'unicorn', 'slug': u'unicorn'},
-                                       {'name': u'ceramic', 'slug': u'ceramic'},
-                                       {'name': u'nazi', 'slug': u'nazi'}]
+                                      u'yin, yang'