Add Fix django.contrib.auth.middleware monkey patching for APITestCase

This patch rollbacks changes in APITestCase introduced in the
0d16361326 commit to unblock Horizon
plugins gates.

Conflicts:
        openstack_dashboard/test/helpers.py

Note(elod.illes): the above mentioned change in APITestCase was
backported to queens, so this rollback should be backported, too.

Change-Id: I6b2be31568e4aa4273990f9cfa76ca139620c84b
Closes-bug: #1806053
Closes-bug: #1805240
(cherry picked from commit de69edd040)
(cherry picked from commit 85fef71c0d)
This commit is contained in:
Ivan Kolodyazhny 2018-11-30 17:33:21 +02:00 committed by Előd Illés
parent 911d7d3344
commit 9ba7a03607
1 changed files with 1 additions and 0 deletions

View File

@ -466,6 +466,7 @@ class APITestCase(TestCase):
"""
def setUp(self):
super(APITestCase, self).setUp()
utils.patch_middleware_get_user()
def fake_keystoneclient(request, admin=False):
"""Returns the stub keystoneclient.