Only set creator when creating task (#80)

* Only set creator when creating task

* allow blank form input, use clean func to keep old val

* remove unneeded created_date assignment

* add test
This commit is contained in:
james1293 2019-07-30 01:53:33 -04:00 committed by Scot Hacker
parent 7f576c9bc8
commit 2d40ef471e
7 changed files with 88 additions and 2 deletions

View file

@ -29,6 +29,12 @@ def todo_setup(django_user_model):
Task.objects.create(created_by=u2, title="Task 2", task_list=tlist2, priority=2, completed=True)
Task.objects.create(created_by=u2, title="Task 3", task_list=tlist2, priority=3)
# Add a third user for a test that needs two users in the same group.
extra_g2_user = django_user_model.objects.create_user(
username="extra_g2_user", password="password", email="extra_g2_user@example.com", is_staff=True
)
extra_g2_user.groups.add(g2)
@pytest.fixture()
# Set up an in-memory mail server to receive test emails