The file demo-files/media/ethics/Ethics_Approval_567b029d-9ea6-41b8-b738-bf45675b24ce.txt was added in pull #2241.
For some reason, loaddemo is copying this file, not to media/ethics/Ethics_Approval_567b029d-9ea6-41b8-b738-bf45675b24ce.txt, but to media/ethics.
This clearly doesn't work, and also breaks resetdb.
In contrast, TestMixin apparently installs the file in the correct place in the testing media directory - which is why test_urls works.
TestMixin should be doing the same thing as loaddemo when setting-up demo files, and it should be doing the same thing as resetdb when tearing-down. (That said, it'd be good to avoid doing this setup/teardown for each individual test function.)
The file
demo-files/media/ethics/Ethics_Approval_567b029d-9ea6-41b8-b738-bf45675b24ce.txt
was added in pull #2241.For some reason,
loaddemo
is copying this file, not tomedia/ethics/Ethics_Approval_567b029d-9ea6-41b8-b738-bf45675b24ce.txt
, but tomedia/ethics
.This clearly doesn't work, and also breaks
resetdb
.In contrast,
TestMixin
apparently installs the file in the correct place in the testing media directory - which is why test_urls works.TestMixin
should be doing the same thing asloaddemo
when setting-up demo files, and it should be doing the same thing asresetdb
when tearing-down. (That said, it'd be good to avoid doing this setup/teardown for each individual test function.)