Fix running extension unit tests that need the default logo.png.
Review Request #11315 — Created Dec. 4, 2020 and submitted — Latest diff uploaded
A few of our unit test helpers try to use our in-tree
logo.png
as test
data. This is used for screenshots and file attachments. The path to
this is built usingsettings.STATIC_ROOT
, and in-tree, this works
fine. However, if run in an extension's unit test suite,
settings.STATIC_ROOT
won't point to the Review Board tree'sstatic
directory, causing these to fail.This change gets rid of the
STATIC_ROOT
usage and instead computes the
actual path to the bundledstatic
directory. This will ensure that
tests will work without having to worry aboutSTATIC_ROOT
.
Unit tests pass in Review Board and in extension trees that were failing.