Opened 7 years ago

Closed 7 years ago

#10041 closed (fixed)

Form tests are set to upload files to '/'

Reported by: Gulopine Owned by: Gulopine
Component: Forms Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation:
Needs tests: Patch needs improvement:
Easy pickings: UI/UX:

Description

The tests in tests/regressiontests/forms/models.py include a FileModel that's currently configured with upload_to='/' . Because of the changes in [8244], this is no longer allowed unless MEDIA_ROOT is also set to '/' , which is highly unlikely to be the case. Currently, the test doesn't attempt to save the file, so this doesn't cause a failure, but with the work on model validation, the behavior present in this test will cause the file to be saved, which does introduce a failure into the test suite.

Attachments (1)

10041.diff (1.1 KB) - added by Gulopine 7 years ago.
Updated the test to use a temporary directory, like other tests currently do.

Download all attachments as: .zip

Change History (2)

Changed 7 years ago by Gulopine

Updated the test to use a temporary directory, like other tests currently do.

comment:1 Changed 7 years ago by jacob

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

(In [9765]) Fixed #10041: use a tempdir for files in the forms test. Thanks, Marty Alchin.

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