# 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/>.
+import six
import six.moves.urllib.parse as urlparse
import pytest
assert new_metadata == old_metadata
context = template.TEMPLATE_TEST_CONTEXT[
'mediagoblin/edit/metadata.html']
- assert context['form'].errors['media_metadata'][0]['identifier'][0] == \
- "'On the worst day' is not a 'date-time'"
+ if six.PY2:
+ expected = "u'On the worst day' is not a 'date-time'"
+ else:
+ expected = "'On the worst day' is not a 'date-time'"
+ assert context['form'].errors[
+ 'media_metadata'][0]['identifier'][0] == expected