Fix running extension unit tests that need the default logo.png.

Review Request #11315 — Created Dec. 4, 2020 and submitted

Information

Review Board
release-4.0.x

Reviewers

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 using settings.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's static
directory, causing these to fail.

This change gets rid of the STATIC_ROOT usage and instead computes the
actual path to the bundled static directory. This will ensure that
tests will work without having to worry about STATIC_ROOT.

Unit tests pass in Review Board and in extension trees that were failing.

Summary ID
Fix running extension unit tests that need the default logo.png.
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 using `settings.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's `static` directory, causing these to fail. This change gets rid of the `STATIC_ROOT` usage and instead computes the actual path to the bundled `static` directory. This will ensure that tests will work without having to worry about `STATIC_ROOT`.
98f0fbc837b6b0fd68a535051e24a9cbd43748cc
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-4.0.x (a6c01fd)