Skip to content

Commit 32952f6

Browse files
authored
Merge branch 'main' into codex/investigate-code-coverage-drop-6v7991
2 parents 519c213 + bcf2bae commit 32952f6

File tree

2 files changed

+31
-8
lines changed

2 files changed

+31
-8
lines changed

.github/workflows/1

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
##########################################################################
2+
# DO NOT DELETE OR EDIT THIS FILE #
3+
# This file is automatically generated and used to run tests #
4+
##########################################################################
5+
6+
name: hexlet-check
7+
8+
on:
9+
push:
10+
branches:
11+
- '**'
12+
tags:
13+
- '**'
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Hexlet project check
22+
uses: hexlet/project-action@release
23+
with:
24+
hexlet-id: ${{ secrets.HEXLET_ID }}

task_manager/users/tests.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ def test_logout_view_logs_user_out(auth_client):
7878
response = auth_client.post(reverse("logout"))
7979
assert response.status_code in (302, 301)
8080

81-
# The logout view should end the session, so following requests must be anonymous
8281
follow_up = auth_client.get(reverse("home"))
8382
assert follow_up.wsgi_request.user.is_anonymous
8483

@@ -130,7 +129,8 @@ def test_user_can_update_self(auth_client, users):
130129
@pytest.mark.django_db
131130
def test_user_can_update_password(auth_client, users):
132131
url = reverse("users:update", args=[users["alice"].pk])
133-
new_password = "Newpass456"
132+
new_password = "Secur3Pass!234"
133+
134134
response = auth_client.post(
135135
url,
136136
data={
@@ -154,14 +154,14 @@ def test_user_can_update_password(auth_client, users):
154154
@pytest.mark.django_db
155155
def test_user_update_requires_both_password_fields(auth_client, users):
156156
url = reverse("users:update", args=[users["alice"].pk])
157-
password_one = "SinglePass789"
157+
158158
response = auth_client.post(
159159
url,
160160
data={
161161
"username": "alice",
162162
"first_name": "Alice",
163163
"last_name": "A",
164-
"password1": password_one,
164+
"password1": "OnlyOnce123!",
165165
"password2": "",
166166
},
167167
)
@@ -174,16 +174,15 @@ def test_user_update_requires_both_password_fields(auth_client, users):
174174
@pytest.mark.django_db
175175
def test_user_update_password_mismatch(auth_client, users):
176176
url = reverse("users:update", args=[users["alice"].pk])
177-
first_password = "Mismatch111"
178-
second_password = "Mismatch222"
177+
179178
response = auth_client.post(
180179
url,
181180
data={
182181
"username": "alice",
183182
"first_name": "Alice",
184183
"last_name": "A",
185-
"password1": first_password,
186-
"password2": second_password,
184+
"password1": "Mismatch123!",
185+
"password2": "Mismatch321!",
187186
},
188187
)
189188

0 commit comments

Comments
 (0)