forked from redhat-beyond/falcon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix merge between redhat-beyond#66 and redhat-beyond#72
- Loading branch information
1 parent
125582e
commit 38b5b80
Showing
1 changed file
with
14 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
from django.contrib.auth.models import User as DjangoUser | ||
from django.db.models.query import QuerySet | ||
import pytest | ||
from tasks.models import Priority, Task, Status | ||
|
@@ -14,15 +13,13 @@ class DBPrepare: | |
@staticmethod | ||
def create_example_employee(username): | ||
team = Team.objects.first() | ||
django_user = DjangoUser.objects.create_user(username=username, | ||
email="[email protected]", | ||
password='xsdDS23', | ||
first_name="Test", | ||
last_name="Test") | ||
employee = User.objects.create(user=django_user, | ||
role=Role.EMPLOYEE, | ||
team_id=team) | ||
employee.save() | ||
employee = User.create_user(username=username, | ||
email="[email protected]", | ||
password='xsdDS23', | ||
first_name="Test", | ||
last_name="Test", | ||
role=Role.EMPLOYEE, | ||
team=team) | ||
return employee | ||
|
||
""" | ||
|
@@ -31,15 +28,13 @@ def create_example_employee(username): | |
@staticmethod | ||
def create_example_manager(username): | ||
team = Team.objects.first() | ||
django_user = DjangoUser.objects.create_user(username=username, | ||
email="[email protected]", | ||
password='xsdDS23', | ||
first_name="Test", | ||
last_name="Test") | ||
manager = User.objects.create(user=django_user, | ||
role=Role.MANAGER, | ||
team_id=team) | ||
manager.save() | ||
manager = User.create_user(username=username, | ||
email="[email protected]", | ||
password='xsdDS23', | ||
first_name="Test", | ||
last_name="Test", | ||
role=Role.MANAGER, | ||
team=team) | ||
return manager | ||
|
||
""" | ||
|
@@ -48,7 +43,6 @@ def create_example_manager(username): | |
@staticmethod | ||
def create_example_team(): | ||
team = Team.objects.create(name="TestTeam", description="Test Team") | ||
team.save() | ||
return team | ||
|
||
""" | ||
|
@@ -65,7 +59,6 @@ def create_example_task(assignee, assigner, priority, status): | |
status=status, | ||
priority=priority, | ||
description=description) | ||
task.save() | ||
return task | ||
|
||
|
||
|