Commit 6933907a authored by Michal Čihař's avatar Michal Čihař

Various Python 3 compatibility fixes

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent d3b39131
......@@ -334,8 +334,8 @@ class RegistrationTest(TestCase, RegistrationTestMixin):
follow=True
)
user = User.objects.get(username='weblate')
self.assertEquals(user.first_name, 'Weblate')
self.assertEquals(user.email, 'noreply@weblate.org')
self.assertEqual(user.first_name, 'Weblate')
self.assertEqual(user.email, 'noreply@weblate.org')
class NoCookieRegistrationTest(RegistrationTest):
......
......@@ -216,7 +216,7 @@ def mt_services(request):
Generates list of installed machine translation services in JSON.
'''
# Machine translation
machine_services = MACHINE_TRANSLATION_SERVICES.keys()
machine_services = list(MACHINE_TRANSLATION_SERVICES.keys())
return JsonResponse(
data=machine_services,
......
......@@ -146,7 +146,7 @@ def generate_counts(component, start_date, end_date):
result[email]['words'] += words
result[email]['count'] += 1
return result.values()
return list(result.values())
@login_required
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment