Opened 3 years ago

Closed 3 years ago

#21505 closed Cleanup/optimization (fixed)

Add unit test for django.utils.text.get_valid_filename

Reported by: vajrasky Owned by: vajrasky
Component: Utilities Version: master
Severity: Normal Keywords: test
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


There is no unit test for django.utils.text.get_valid_filename.

get_valid_filename("john's portrait in 2004.jpg")


It is used by FileSystemStorage.

obj = Storage()"&'@{}[],$=!-#()%+~_.txt", ContentFile("more content"))
print( ==> "-_.txt"

Change History (3)

comment:1 Changed 3 years ago by vajrasky

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to vajrasky
  • Patch needs improvement unset
  • Status changed from new to assigned

comment:2 Changed 3 years ago by vajrasky

  • Has patch set

comment:3 Changed 3 years ago by Baptiste Mispelon <bmispelon@…>

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

In 7169722d5c4c9f9829e353fbeda08b7550bf8991:

Fixed #21505 -- Added unit test for django.utils.text.get_valid_filename.

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