@@ -251,14 +251,14 @@ def test_ip_field(self):
251251 result = StringIO ()
252252 with contextlib .redirect_stdout (result ):
253253 call_command ("shellcompletion" , "complete" , "model_fields test --ip " )
254- result = result .getvalue ()
254+ result = result .getvalue (). replace ( " \\ " , "" )
255255 for ip in self .field_values ["ip_field" ]:
256256 self .assertTrue (ip in result )
257257
258258 result = StringIO ()
259259 with contextlib .redirect_stdout (result ):
260260 call_command ("shellcompletion" , "complete" , "model_fields test --ip 2001:" )
261- result = result .getvalue ()
261+ result = result .getvalue (). replace ( " \\ " , "" )
262262 for ip in ["2001::1" ]:
263263 self .assertTrue (ip in result )
264264
@@ -274,7 +274,7 @@ def test_ip_field(self):
274274 call_command (
275275 "shellcompletion" , "complete" , "model_fields test --ip 2a02:42"
276276 )
277- result = result .getvalue ()
277+ result = result .getvalue (). replace ( " \\ " , "" )
278278 for ip in ["2a02:42fe::4" , "2a02:42ae::4" ]:
279279 self .assertTrue (ip in result )
280280
@@ -283,28 +283,28 @@ def test_ip_field(self):
283283 call_command (
284284 "shellcompletion" , "complete" , "model_fields test --ip 2a02:42f"
285285 )
286- result = result .getvalue ()
286+ result = result .getvalue (). replace ( " \\ " , "" )
287287 for ip in ["2a02:42fe::4" ]:
288288 self .assertTrue (ip in result )
289289
290290 result = StringIO ()
291291 with contextlib .redirect_stdout (result ):
292292 call_command ("shellcompletion" , "complete" , "model_fields test --ip 192." )
293- result = result .getvalue ()
293+ result = result .getvalue (). replace ( " \\ " , "" )
294294 for ip in ["192.168.1.1" , "192.0.2.30" ]:
295295 self .assertTrue (ip in result )
296296
297297 result = StringIO ()
298298 with contextlib .redirect_stdout (result ):
299299 call_command ("shellcompletion" , "complete" , "model_fields test --ip 192.1" )
300- result = result .getvalue ()
300+ result = result .getvalue (). replace ( " \\ " , "" )
301301 for ip in ["192.168.1.1" ]:
302302 self .assertTrue (ip in result )
303303
304304 result = StringIO ()
305305 with contextlib .redirect_stdout (result ):
306306 call_command ("shellcompletion" , "complete" , "model_fields test --ip :" )
307- result = result .getvalue ()
307+ result = result .getvalue (). replace ( " \\ " , "" )
308308 for ip in ["::ffff:10.10.10.10" ]:
309309 self .assertTrue (ip in result )
310310
0 commit comments