@@ -29,7 +29,6 @@ def test_create_summaries_invalid_json(test_app):
29
29
"loc" : ["body" , "url" ],
30
30
"msg" : "Field required" ,
31
31
"type" : "missing" ,
32
- "url" : "https://errors.pydantic.dev/2.5/v/missing" ,
33
32
}
34
33
]
35
34
}
@@ -48,7 +47,7 @@ def mock_generate_summary(summary_id, url):
48
47
monkeypatch .setattr (summaries , "generate_summary" , mock_generate_summary )
49
48
50
49
response = test_app_with_db .post (
51
- "/summaries/" , data = json .dumps ({"url" : "https://foo.bar" })
50
+ "/summaries/" , data = json .dumps ({"url" : "https://foo.bar/ " })
52
51
)
53
52
summary_id = response .json ()["id" ]
54
53
@@ -76,7 +75,6 @@ def test_read_summary_incorrect_id(test_app_with_db):
76
75
"loc" : ["path" , "id" ],
77
76
"msg" : "Input should be greater than 0" ,
78
77
"type" : "greater_than" ,
79
- "url" : "https://errors.pydantic.dev/2.5/v/greater_than" ,
80
78
}
81
79
]
82
80
}
@@ -89,7 +87,7 @@ def mock_generate_summary(summary_id, url):
89
87
monkeypatch .setattr (summaries , "generate_summary" , mock_generate_summary )
90
88
91
89
response = test_app_with_db .post (
92
- "/summaries/" , data = json .dumps ({"url" : "https://foo.bar" })
90
+ "/summaries/" , data = json .dumps ({"url" : "https://foo.bar/ " })
93
91
)
94
92
summary_id = response .json ()["id" ]
95
93
@@ -107,7 +105,7 @@ def mock_generate_summary(summary_id, url):
107
105
monkeypatch .setattr (summaries , "generate_summary" , mock_generate_summary )
108
106
109
107
response = test_app_with_db .post (
110
- "/summaries/" , data = json .dumps ({"url" : "https://foo.bar" })
108
+ "/summaries/" , data = json .dumps ({"url" : "https://foo.bar/ " })
111
109
)
112
110
summary_id = response .json ()["id" ]
113
111
@@ -131,7 +129,6 @@ def test_remove_summary_incorrect_id(test_app_with_db):
131
129
"loc" : ["path" , "id" ],
132
130
"msg" : "Input should be greater than 0" ,
133
131
"type" : "greater_than" ,
134
- "url" : "https://errors.pydantic.dev/2.5/v/greater_than" ,
135
132
}
136
133
]
137
134
}
@@ -144,13 +141,13 @@ def mock_generate_summary(summary_id, url):
144
141
monkeypatch .setattr (summaries , "generate_summary" , mock_generate_summary )
145
142
146
143
response = test_app_with_db .post (
147
- "/summaries/" , data = json .dumps ({"url" : "https://foo.bar" })
144
+ "/summaries/" , data = json .dumps ({"url" : "https://foo.bar/ " })
148
145
)
149
146
summary_id = response .json ()["id" ]
150
147
151
148
response = test_app_with_db .put (
152
149
f"/summaries/{ summary_id } /" ,
153
- data = json .dumps ({"url" : "https://foo.bar" , "summary" : "updated!" }),
150
+ data = json .dumps ({"url" : "https://foo.bar/ " , "summary" : "updated!" }),
154
151
)
155
152
assert response .status_code == 200
156
153
@@ -166,13 +163,13 @@ def mock_generate_summary(summary_id, url):
166
163
[
167
164
[
168
165
999 ,
169
- {"url" : "https://foo.bar" , "summary" : "updated!" },
166
+ {"url" : "https://foo.bar/ " , "summary" : "updated!" },
170
167
404 ,
171
168
"Summary not found" ,
172
169
],
173
170
[
174
171
0 ,
175
- {"url" : "https://foo.bar" , "summary" : "updated!" },
172
+ {"url" : "https://foo.bar/ " , "summary" : "updated!" },
176
173
422 ,
177
174
[
178
175
{
@@ -181,7 +178,6 @@ def mock_generate_summary(summary_id, url):
181
178
"msg" : "Input should be greater than 0" ,
182
179
"input" : "0" ,
183
180
"ctx" : {"gt" : 0 },
184
- "url" : "https://errors.pydantic.dev/2.5/v/greater_than" ,
185
181
}
186
182
],
187
183
],
@@ -195,28 +191,25 @@ def mock_generate_summary(summary_id, url):
195
191
"loc" : ["body" , "url" ],
196
192
"msg" : "Field required" ,
197
193
"input" : {},
198
- "url" : "https://errors.pydantic.dev/2.5/v/missing" ,
199
194
},
200
195
{
201
196
"type" : "missing" ,
202
197
"loc" : ["body" , "summary" ],
203
198
"msg" : "Field required" ,
204
199
"input" : {},
205
- "url" : "https://errors.pydantic.dev/2.5/v/missing" ,
206
200
},
207
201
],
208
202
],
209
203
[
210
204
1 ,
211
- {"url" : "https://foo.bar" },
205
+ {"url" : "https://foo.bar/ " },
212
206
422 ,
213
207
[
214
208
{
215
209
"type" : "missing" ,
216
210
"loc" : ["body" , "summary" ],
217
211
"msg" : "Field required" ,
218
- "input" : {"url" : "https://foo.bar" },
219
- "url" : "https://errors.pydantic.dev/2.5/v/missing" ,
212
+ "input" : {"url" : "https://foo.bar/" },
220
213
}
221
214
],
222
215
],
0 commit comments