Opened 3 years ago

Closed 3 years ago

#18980 closed Bug (fixed)

master .assertContains after d1452f60 should still coerce objects to text.

Reported by: jdunck Owned by: nobody
Component: Testing framework Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In [1], smart_str(text) was removed, but probably shouldn't have been.

Let's put back the py3 analog, force_text.

[1] https://github.com/django/django/commit/d1452f60974da6f0e54ff9ad7a03d2c115675d10

Change History (4)

comment:1 Changed 3 years ago by claudep

Any failure scenario at hand?

comment:2 Changed 3 years ago by jdunck

Here's a pull request w/ fix and tests. Sorry for the delay - I had the branch ready to go but lost internet connection just after filing the ticket but just before making the pull request.

https://github.com/django/django/pull/381

comment:3 Changed 3 years ago by jdunck

  • Has patch set

comment:4 Changed 3 years ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 40e62a5ccd08f241e977c9ffcb96005b9f2d95e6:

Fixed #18980 -- Fixed assertContains regression when passed an object

Note: See TracTickets for help on using tickets.
Back to Top