@@ -251,14 +251,14 @@ def test_ip_field(self):
251
251
result = StringIO ()
252
252
with contextlib .redirect_stdout (result ):
253
253
call_command ("shellcompletion" , "complete" , "model_fields test --ip " )
254
- result = result .getvalue ()
254
+ result = result .getvalue (). replace ( " \\ " , "" )
255
255
for ip in self .field_values ["ip_field" ]:
256
256
self .assertTrue (ip in result )
257
257
258
258
result = StringIO ()
259
259
with contextlib .redirect_stdout (result ):
260
260
call_command ("shellcompletion" , "complete" , "model_fields test --ip 2001:" )
261
- result = result .getvalue ()
261
+ result = result .getvalue (). replace ( " \\ " , "" )
262
262
for ip in ["2001::1" ]:
263
263
self .assertTrue (ip in result )
264
264
@@ -274,7 +274,7 @@ def test_ip_field(self):
274
274
call_command (
275
275
"shellcompletion" , "complete" , "model_fields test --ip 2a02:42"
276
276
)
277
- result = result .getvalue ()
277
+ result = result .getvalue (). replace ( " \\ " , "" )
278
278
for ip in ["2a02:42fe::4" , "2a02:42ae::4" ]:
279
279
self .assertTrue (ip in result )
280
280
@@ -283,28 +283,28 @@ def test_ip_field(self):
283
283
call_command (
284
284
"shellcompletion" , "complete" , "model_fields test --ip 2a02:42f"
285
285
)
286
- result = result .getvalue ()
286
+ result = result .getvalue (). replace ( " \\ " , "" )
287
287
for ip in ["2a02:42fe::4" ]:
288
288
self .assertTrue (ip in result )
289
289
290
290
result = StringIO ()
291
291
with contextlib .redirect_stdout (result ):
292
292
call_command ("shellcompletion" , "complete" , "model_fields test --ip 192." )
293
- result = result .getvalue ()
293
+ result = result .getvalue (). replace ( " \\ " , "" )
294
294
for ip in ["192.168.1.1" , "192.0.2.30" ]:
295
295
self .assertTrue (ip in result )
296
296
297
297
result = StringIO ()
298
298
with contextlib .redirect_stdout (result ):
299
299
call_command ("shellcompletion" , "complete" , "model_fields test --ip 192.1" )
300
- result = result .getvalue ()
300
+ result = result .getvalue (). replace ( " \\ " , "" )
301
301
for ip in ["192.168.1.1" ]:
302
302
self .assertTrue (ip in result )
303
303
304
304
result = StringIO ()
305
305
with contextlib .redirect_stdout (result ):
306
306
call_command ("shellcompletion" , "complete" , "model_fields test --ip :" )
307
- result = result .getvalue ()
307
+ result = result .getvalue (). replace ( " \\ " , "" )
308
308
for ip in ["::ffff:10.10.10.10" ]:
309
309
self .assertTrue (ip in result )
310
310
0 commit comments