Fix a unit test breakage involving the Search tests on Django 1.11.

Review Request #10855 — Created Jan. 24, 2020 and submitted

chipx86
Review Board
release-4.0.x
reviewboard

One of our unit tests for search signal handling deletes the
SiteConfiguration from the database in order to ensure some
functionality in the signal processor doesn't crash. While this worked
on Django 1.6, it breaks on 1.11, causing a subsequent test to fail to
find a SiteConfiguration in the database.

This was a pretty scary thing for us to really delete, so we're not
doing that anymore. Instead, we're now spying on
SiteConfiguration.objects.get_current() and simulating an issue
fetching it from the database. This is far less invasive and more
future-proof.

Unit tests pass on Django 1.6 and 1.11.

Summary
Fix a unit test breakage involving the Search tests on Django 1.11.
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.0.x (48212d9)
Loading...