5
5
import pytest
6
6
7
7
8
- @pytest .mark .skip (reason = "No way to test this feature yet" )
8
+ # ## @pytest.mark.skip(reason="No way to test this feature yet")
9
9
def test_mark_complete_on_incomplete_task (client , one_task ):
10
10
# Arrange
11
11
"""
@@ -23,8 +23,8 @@ def test_mark_complete_on_incomplete_task(client, one_task):
23
23
with patch ("requests.post" ) as mock_get :
24
24
mock_get .return_value .status_code = 200
25
25
26
- # Act
27
- response = client .patch ("/tasks/1/mark_complete" )
26
+ # Act
27
+ response = client .patch ("/tasks/1/mark_complete" )
28
28
response_body = response .get_json ()
29
29
30
30
# Assert
@@ -42,7 +42,7 @@ def test_mark_complete_on_incomplete_task(client, one_task):
42
42
assert Task .query .get (1 ).completed_at
43
43
44
44
45
- @pytest .mark .skip (reason = "No way to test this feature yet" )
45
+ # ## ## @pytest.mark.skip(reason="No way to test this feature yet")
46
46
def test_mark_incomplete_on_complete_task (client , completed_task ):
47
47
# Act
48
48
response = client .patch ("/tasks/1/mark_incomplete" )
@@ -62,7 +62,7 @@ def test_mark_incomplete_on_complete_task(client, completed_task):
62
62
assert Task .query .get (1 ).completed_at == None
63
63
64
64
65
- @pytest .mark .skip (reason = "No way to test this feature yet" )
65
+ ## @pytest.mark.skip(reason="No way to test this feature yet")
66
66
def test_mark_complete_on_completed_task (client , completed_task ):
67
67
# Arrange
68
68
"""
@@ -99,7 +99,7 @@ def test_mark_complete_on_completed_task(client, completed_task):
99
99
assert Task .query .get (1 ).completed_at
100
100
101
101
102
- @pytest .mark .skip (reason = "No way to test this feature yet" )
102
+ ## @pytest.mark.skip(reason="No way to test this feature yet")
103
103
def test_mark_incomplete_on_incomplete_task (client , one_task ):
104
104
# Act
105
105
response = client .patch ("/tasks/1/mark_incomplete" )
@@ -119,31 +119,22 @@ def test_mark_incomplete_on_incomplete_task(client, one_task):
119
119
assert Task .query .get (1 ).completed_at == None
120
120
121
121
122
- @pytest .mark .skip (reason = "No way to test this feature yet" )
122
+ ## @pytest.mark.skip(reason="No way to test this feature yet")
123
123
def test_mark_complete_missing_task (client ):
124
124
# Act
125
125
response = client .patch ("/tasks/1/mark_complete" )
126
126
response_body = response .get_json ()
127
127
128
128
# Assert
129
129
assert response .status_code == 404
130
+ assert response_body == {"details" : f"task 1 not found" }
130
131
131
- raise Exception ("Complete test with assertion about response body" )
132
- # *****************************************************************
133
- # **Complete test with assertion about response body***************
134
- # *****************************************************************
135
-
136
-
137
- @pytest .mark .skip (reason = "No way to test this feature yet" )
132
+ ## @pytest.mark.skip(reason="No way to test this feature yet")
138
133
def test_mark_incomplete_missing_task (client ):
139
134
# Act
140
135
response = client .patch ("/tasks/1/mark_incomplete" )
141
136
response_body = response .get_json ()
142
137
143
138
# Assert
144
139
assert response .status_code == 404
145
-
146
- raise Exception ("Complete test with assertion about response body" )
147
- # *****************************************************************
148
- # **Complete test with assertion about response body***************
149
- # *****************************************************************
140
+ assert response_body == {"details" : f"task 1 not found" }
0 commit comments