def setUp(self):
     super(ExtensionInfoV21Test, self).setUp()
     ext_info = extension_info.LoadedExtensionInfo()
     ext_info.extensions = simulated_extension_list
     self.controller = extension_info.ExtensionInfoController(ext_info)
     patcher = mock.patch.object(policy, 'authorize', return_value=True)
     patcher.start()
     self.addCleanup(patcher.stop)
Beispiel #2
0
    def setUp(self):
        super(ExtensionsPolicyTest, self).setUp()
        self.controller = extension_info.ExtensionInfoController()
        self.req = fakes.HTTPRequest.blank('')

        # Check that everyone is able to get extension info.
        self.everyone_authorized_contexts = [
            self.legacy_admin_context, self.system_admin_context,
            self.project_admin_context, self.project_member_context,
            self.project_reader_context, self.project_foo_context,
            self.other_project_reader_context, self.system_member_context,
            self.system_reader_context, self.system_foo_context,
            self.other_project_member_context
        ]
        self.everyone_unauthorized_contexts = []
Beispiel #3
0
 def setUp(self):
     super(ExtensionInfoTest, self).setUp()
     ext_info = extension_info.LoadedExtensionInfo()
     ext_info.extensions = fake_extensions
     self.controller = extension_info.ExtensionInfoController(ext_info)
Beispiel #4
0
 def setUp(self):
     super(ExtensionInfoPolicyEnforcementV21, self).setUp()
     ext_info = extension_info.LoadedExtensionInfo()
     ext_info.extensions = fake_extensions
     self.controller = extension_info.ExtensionInfoController(ext_info)
     self.req = fakes.HTTPRequest.blank('')
Beispiel #5
0
 def setUp(self):
     super(ExtensionInfoV21Test, self).setUp()
     ext_info = extension_info.LoadedExtensionInfo()
     ext_info.extensions = simulated_extension_list
     self.controller = extension_info.ExtensionInfoController(ext_info)
     self.stubs.Set(policy, 'enforce', fake_policy_enforce)
 def setUp(self):
     super(ExtensionInfoPolicyEnforcementV21, self).setUp()
     self.controller = extension_info.ExtensionInfoController()
     self.req = fakes.HTTPRequest.blank('')
 def setUp(self):
     super(ExtensionInfoV21Test, self).setUp()
     self.controller = extension_info.ExtensionInfoController()
     patcher = mock.patch.object(policy, 'authorize', return_value=True)
     patcher.start()
     self.addCleanup(patcher.stop)