@override_settings(WAGTAIL_PASSWORD_RESET_ENABLED=False)
    def test_password_reset_view_disabled(self):
        # Get password reset page
        response = self.client.get(reverse('wagtailadmin_password_reset'))

        # Check that the user recieved a 404
        self.assertEqual(response.status_code, 404)
Setup things to be run when tests are started.
dataset/ETHPy150Open torchbox/wagtail/wagtail/wagtailadmin/tests/test_password_reset.py/TestUserPasswordReset.test_password_reset_view_disabled--crossover with--dataset/ETHPy150Open home-assistant/home-assistant/tests/components/media_player/test_universal.py/TestMediaPlayer.setUp