mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
@@ -56,7 +56,7 @@ class Alias(AdminObject):
|
||||
return smart_text(self.address)
|
||||
|
||||
@classmethod
|
||||
def generate_random_address(self):
|
||||
def generate_random_address(cls):
|
||||
"""Generate a random address (local part)."""
|
||||
m = hashlib.md5()
|
||||
for x in random.sample(xrange(10000000), 60):
|
||||
|
||||
@@ -228,6 +228,10 @@ class AliasTestCase(ModoTestCase):
|
||||
self.ajax_post(reverse("admin:alias_add"), values)
|
||||
self.assertEqual(Alias.objects.count(), alias_count + 1)
|
||||
|
||||
del values["domain"]
|
||||
content = self.ajax_post(reverse("admin:alias_add"), values, 400)
|
||||
self.assertIn("domain", content["form_errors"])
|
||||
|
||||
def test_distribution_list_deletion_on_user_update_bug(self):
|
||||
"""This test demonstrates an issue with distribution list being
|
||||
deleted when one of the users which belong to that list is
|
||||
|
||||
Reference in New Issue
Block a user