checkpoint for modoboa.admin tests in both python 2 and 3

This commit is contained in:
Arthur Vuillard
2017-05-11 17:56:16 +02:00
parent 3ffa3a5396
commit 20e34bc199
12 changed files with 41 additions and 42 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ class Alias(AdminObject):
def generate_random_address(cls):
"""Generate a random address (local part)."""
m = hashlib.md5()
for x in random.sample(xrange(10000000), 60):
for x in random.sample(range(10000000), 60):
m.update(str(x))
return m.hexdigest()[:20]