• 
      

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

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

    Information

    Review Board
    release-4.0.x

    Reviewers

    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.

    Commits

    Files