mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-11-28 11:35:05 +01:00
New fixes
This commit is contained in:
@@ -44,7 +44,7 @@ class Command(BaseCommand):
|
||||
).first()
|
||||
if not addressbook:
|
||||
raise CommandError(
|
||||
"Address Book for email '%s' not found" % options["email"]
|
||||
"Address Book for email '{}' not found".format(options["email"])
|
||||
)
|
||||
try:
|
||||
import_csv_file(
|
||||
@@ -55,5 +55,5 @@ class Command(BaseCommand):
|
||||
options.get("carddav_password"),
|
||||
)
|
||||
except RuntimeError as err:
|
||||
raise CommandError(err)
|
||||
raise CommandError(err) from None
|
||||
self.stdout.write(self.style.SUCCESS("File was imported successfuly"))
|
||||
|
||||
@@ -24,7 +24,7 @@ class TestDataMixin:
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
"""Create test data."""
|
||||
super(TestDataMixin, cls).setUpTestData()
|
||||
super().setUpTestData()
|
||||
admin_factories.populate_database()
|
||||
cls.user = core_models.User.objects.get(username="user@test.com")
|
||||
cls.addressbook = cls.user.addressbook_set.first()
|
||||
|
||||
Reference in New Issue
Block a user