Bullet-proof some static media operations in the unit tests.
Review Request #11918 — Created Jan. 10, 2022 and submitted — Latest diff uploaded
We had a couple of areas where we made some bad assumptions about static
media. These were specific to unit tests.
tests/settings.pybuild absolute paths relative to the current
working directory, assuming that directory would be
tests. This won't
be a safe assumption when using
pytest. Instead, we now build a path
relative to the
We also had a test that deleted and rebuild some static media
directories. It assumed all parent directories for the static media path
existed, but this wasn't safe either. We now use
construct all missing parents.
Unit tests pass with the old test runner and the new
all supported versions of Python.