MIT-LCP / physionet-build

The new PhysioNet platform.
https://physionet.org/
BSD 3-Clause "New" or "Revised" License
56 stars 20 forks source link

loaddemo installing weird "ethics" file #2247

Closed bemoody closed 1 week ago

bemoody commented 3 months ago

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.)