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

This commit is contained in:
Zuul 2018-11-30 17:51:09 +00:00 committed by Gerrit Code Review
commit e88240ffc5
1 changed files with 4 additions and 5 deletions

View File

@ -451,11 +451,10 @@ class BaseAdminViewTests(TestCase):
self.client.cookies[settings.SESSION_COOKIE_NAME] = store.session_key
# NOTE(adriant): APITestCase was only needed for some openstack_auth
# monkeypatching. With the new monkeypatch middleware from openstack_auth this
# is not needed.
# TODO(adriant): Clean up APITestCase usage in horizon plugins.
APITestCase = TestCase
class APITestCase(TestCase):
def setUp(self):
super(APITestCase, self).setUp()
utils.patch_middleware_get_user()
# APIMockTestCase was introduced to support mox to mock migration smoothly