diff --git a/openstack_dashboard/test/helpers.py b/openstack_dashboard/test/helpers.py
index <HASH>..<HASH> 100644
--- a/openstack_dashboard/test/helpers.py
+++ b/openstack_dashboard/test/helpers.py
@@ -151,12 +151,16 @@ class TestCase(horizon_helpers.TestCase):
         middleware.HorizonMiddleware().process_request(self.request)
         AuthenticationMiddleware().process_request(self.request)
         self.patchers = {}
+        self.add_panel_mocks()
+        os.environ["HORIZON_TEST_RUN"] = "True"
+
+    def add_panel_mocks(self):
+        """Global mocks on panels that get called on all views."""
         self.patchers['aggregates'] = mock.patch(
             'openstack_dashboard.dashboards.admin'
             '.aggregates.panel.Aggregates.can_access',
             mock.Mock(return_value=True))
         self.patchers['aggregates'].start()
-        os.environ["HORIZON_TEST_RUN"] = "True"
 
     def tearDown(self):
         self.mox.UnsetStubs()
Move the panel mocks to a separate method on TestCase

We need to remove the panel mocks in Tuskar-UI tests, because they
import and register the admin panel as their side effect. To do that
easily, I'm moving that part into a separate method.

Partial-bug: #<I>
Change-Id: Ica<I>c0b9f<I>a<I>e<I>a<I>ffdb<I>e4f4