def test_config_overrides(self):

        # Confirm global configuration
        gc = self.config.cors
        self.assertEqual(gc.allowed_origin, ['http://default.example.com'])
        self.assertEqual(gc.allow_credentials, True)
        self.assertEqual(gc.expose_headers, [])
        self.assertEqual(gc.max_age, None)
        self.assertEqual(gc.allow_methods, ['GET', 'PUT', 'POST', 'DELETE',
                                            'HEAD'])
        self.assertEqual(gc.allow_headers, [])

        # Confirm all-methods overrides.
        ac = self.config['cors.wildcard']
        self.assertEqual(ac.allowed_origin, ['*'])
        self.assertEqual(gc.allow_credentials, True)
        self.assertEqual(ac.expose_headers, gc.expose_headers)
        self.assertEqual(ac.max_age, gc.max_age)
        self.assertEqual(ac.allow_methods, ['GET'])
        self.assertEqual(ac.allow_headers, gc.allow_headers)
Assert that the configuration options are properly registered.
dataset/ETHPy150Open openstack/oslo.middleware/oslo_middleware/tests/test_cors.py/CORSTestWildcard.test_config_overrides