fix a test in python3

This commit is contained in:
Arthur Vuillard
2017-05-11 18:19:33 +02:00
parent 67729a8f30
commit 4d109a6857
2 changed files with 5 additions and 3 deletions
+3 -2
View File
@@ -9,7 +9,7 @@ from django.core.urlresolvers import reverse
from django.db import models
from django.utils import timezone
from django.utils.encoding import (
python_2_unicode_compatible, smart_bytes, smart_text)
python_2_unicode_compatible, smart_bytes, smart_text, force_str)
from django.utils.functional import cached_property
from django.utils.translation import ugettext as _, ugettext_lazy
@@ -154,7 +154,7 @@ class User(PermissionsMixin):
match = self.password_expr.match(self.password)
if match is None:
return False
raw_value = smart_bytes(raw_value)
raw_value = force_str(raw_value)
scheme = match.group(1)
val2 = match.group(2)
hasher = get_password_hasher(scheme)
@@ -425,6 +425,7 @@ class User(PermissionsMixin):
row += result[1]
csvwriter.writerow(row)
reversion.register(User)