Skip to content

Commit 9fc2c4a

Browse files
committed
little finish cleanup
1 parent ab567e3 commit 9fc2c4a

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

tests/test_tasks_crud.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def status_new(db):
2929
@pytest.mark.django_db
3030
def test_login_required(client):
3131
r = client.get("/tasks/")
32-
assert r.status_code in (302, 301) # редирект на users:login
32+
assert r.status_code in (302, 301)
3333

3434

3535
@pytest.mark.django_db
@@ -51,7 +51,7 @@ def test_create(auth_client, users, status_new):
5151
"name": "Новая задача",
5252
"description": "Что-то сделать",
5353
"status": status_new.pk,
54-
"executor": users["u2"].pk, # можно и не указывать
54+
"executor": users["u2"].pk,
5555
})
5656
assert resp.status_code in (302, 301)
5757
assert Task.objects.filter(name="Новая задача",

tests/test_users_crud.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def auth_client(users):
3030
return c
3131

3232

33-
# ---- LIST ----
3433
@pytest.mark.django_db
3534
def test_users_list_is_public(client, users):
3635
resp = client.get("/users/")
@@ -40,7 +39,6 @@ def test_users_list_is_public(client, users):
4039
assert "bob" in html
4140

4241

43-
# ---- CREATE (registration) ----
4442
@pytest.mark.django_db
4543
def test_registration_get(client):
4644
r = client.get("/users/create/")
@@ -65,7 +63,6 @@ def test_registration_post_creates_user(client):
6563
assert User.objects.filter(username="charlie").exists()
6664

6765

68-
# ---- UPDATE ----
6966
@pytest.mark.django_db
7067
def test_update_requires_auth_redirects(client, users):
7168
url = f"/users/{users['alice'].pk}/update/"

0 commit comments

Comments
 (0)