tests for modoboa.admin for python 2 and 3

This commit is contained in:
Arthur Vuillard
2017-05-11 23:22:22 +02:00
parent 2f5394a0f1
commit 6fe26028d4
12 changed files with 62 additions and 44 deletions
+9 -8
View File
@@ -9,7 +9,8 @@ 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, force_str)
python_2_unicode_compatible, smart_bytes, smart_text, force_str, force_text
)
from django.utils.functional import cached_property
from django.utils.translation import ugettext as _, ugettext_lazy
@@ -411,13 +412,13 @@ class User(PermissionsMixin):
"""
row = [
"account",
smart_bytes(self.username),
smart_bytes(self.password),
smart_bytes(self.first_name),
smart_bytes(self.last_name),
self.is_active,
self.role,
smart_bytes(self.email)
force_text(self.username),
force_text(self.password),
force_text(self.first_name),
force_text(self.last_name),
force_text(self.is_active),
force_text(self.role),
force_text(self.email)
]
results = signals.account_exported.send(
sender=self.__class__, user=self)