Smoke and permissions tests
And various bug / permissions config tweaks to accompany
This commit is contained in:
parent
0d7a933d1c
commit
f4d1da0ab7
7 changed files with 161 additions and 49 deletions
17
todo/tests/conftest.py
Normal file
17
todo/tests/conftest.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
import pytest
|
||||
|
||||
from django.contrib.auth.models import Group
|
||||
|
||||
from todo.models import Item, TaskList
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def todo_setup(django_user_model):
|
||||
g1 = Group.objects.create(name="Weavers")
|
||||
u1 = django_user_model.objects.create(username="you", password="password")
|
||||
u1.groups.add(g1)
|
||||
tlist = TaskList.objects.create(group=g1, name="Zip", slug="zip")
|
||||
|
||||
Item.objects.create(created_by=u1, title="Task 1", task_list=tlist, priority=1)
|
||||
Item.objects.create(created_by=u1, title="Task 2", task_list=tlist, priority=2)
|
||||
Item.objects.create(created_by=u1, title="Task 3", task_list=tlist, priority=3)
|
Loading…
Add table
Add a link
Reference in a new issue