Python 3.6 compatibility: Applied 2to3

This commit is contained in:
2017-03-03 15:08:48 +01:00
parent cd17236428
commit 4e8c735f6b
14 changed files with 131 additions and 140 deletions

View File

@@ -1,8 +1,5 @@
# -*- coding=utf-8 -*-
from __future__ import absolute_import
import collections
import datetime
import logging.config
@@ -33,9 +30,9 @@ class ShortcodeTest(AbstractAttractTest):
from attract import shortcodes
with self.app.test_request_context():
code = shortcodes.generate_shortcode(self.proj_id, u'jemoeder', u'ø')
self.assertEqual(u'ø1', code)
code = shortcodes.generate_shortcode(self.proj_id, 'jemoeder', 'ø')
self.assertEqual('ø1', code)
with self.app.test_request_context():
code = shortcodes.generate_shortcode(self.proj_id, u'jemoeder', u'č')
self.assertEqual(u'č2', code)
code = shortcodes.generate_shortcode(self.proj_id, 'jemoeder', 'č')
self.assertEqual('č2', code)