summaryrefslogtreecommitdiff
path: root/ishtar_common/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/tests.py')
-rw-r--r--ishtar_common/tests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py
index d3ac4a4bd..e3958814c 100644
--- a/ishtar_common/tests.py
+++ b/ishtar_common/tests.py
@@ -72,6 +72,9 @@ class OOOGenerationTest(TestCase):
def create_superuser():
username = 'username4277'
password = 'dcbqj756456!@%'
+ q = User.objects.filter(username=username)
+ if q.count():
+ return username, password, q.all()[0]
user = User.objects.create_superuser(username, "nomail@nomail.com",
password)
user.set_password(password)
@@ -82,6 +85,9 @@ def create_superuser():
def create_user():
username = 'username678'
password = 'dcbqj756456!@%'
+ q = User.objects.filter(username=username)
+ if q.count():
+ return username, password, q.all()[0]
user = User.objects.create_user(username, email="nomail2@nomail.com")
user.set_password(password)
user.save()