Source: aiohttp-cors
Version: 0.5.3-1
Severity: serious

Some recent change in unstable makes aiohttp-cors FTBFS:

https://tests.reproducible-builds.org/debian/history/aiohttp-cors.html
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/aiohttp-cors.html

...
==================================== ERRORS ====================================
_____________ ERROR at teardown of TestMain.test_preflight_default _____________

self = <tests.integration.test_main.TestMain testMethod=test_preflight_default>

    def tearDown(self):
        self.session.close()
    
        if self.server is not None:
>           self.loop.run_until_complete(self.shutdown_server())

tests/integration/test_main.py:70: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.6/asyncio/base_events.py:467: in run_until_complete
    return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.integration.test_main.TestMain testMethod=test_preflight_default>

    @asyncio.coroutine
    def shutdown_server(self):
        """Shutdown server."""
        assert self.server is not None
    
        self.server.close()
>       yield from self.handler.finish_connections()
E       AttributeError: 'Server' object has no attribute 'finish_connections'

tests/integration/test_main.py:101: AttributeError
______________ ERROR at teardown of TestMain.test_simple_default _______________

self = <tests.integration.test_main.TestMain testMethod=test_simple_default>

    def tearDown(self):
        self.session.close()
    
        if self.server is not None:
>           self.loop.run_until_complete(self.shutdown_server())

tests/integration/test_main.py:70: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.6/asyncio/base_events.py:467: in run_until_complete
    return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.integration.test_main.TestMain testMethod=test_simple_default>

    @asyncio.coroutine
    def shutdown_server(self):
        """Shutdown server."""
        assert self.server is not None
    
        self.server.close()
>       yield from self.handler.finish_connections()
E       AttributeError: 'Server' object has no attribute 'finish_connections'

tests/integration/test_main.py:101: AttributeError
___________ ERROR at teardown of TestMain.test_simple_expose_headers ___________

self = <tests.integration.test_main.TestMain 
testMethod=test_simple_expose_headers>

    def tearDown(self):
        self.session.close()
    
        if self.server is not None:
>           self.loop.run_until_complete(self.shutdown_server())

tests/integration/test_main.py:70: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.6/asyncio/base_events.py:467: in run_until_complete
    return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.integration.test_main.TestMain 
testMethod=test_simple_expose_headers>

    @asyncio.coroutine
    def shutdown_server(self):
        """Shutdown server."""
        assert self.server is not None
    
        self.server.close()
>       yield from self.handler.finish_connections()
E       AttributeError: 'Server' object has no attribute 'finish_connections'

tests/integration/test_main.py:101: AttributeError
__________ ERROR at teardown of TestMain.test_simple_with_credentials __________

self = <tests.integration.test_main.TestMain 
testMethod=test_simple_with_credentials>

    def tearDown(self):
        self.session.close()
    
        if self.server is not None:
>           self.loop.run_until_complete(self.shutdown_server())

tests/integration/test_main.py:70: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.6/asyncio/base_events.py:467: in run_until_complete
    return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.integration.test_main.TestMain 
testMethod=test_simple_with_credentials>

    @asyncio.coroutine
    def shutdown_server(self):
        """Shutdown server."""
        assert self.server is not None
    
        self.server.close()
>       yield from self.handler.finish_connections()
E       AttributeError: 'Server' object has no attribute 'finish_connections'

tests/integration/test_main.py:101: AttributeError
=================================== FAILURES ===================================
__________________________ TestMain.test_dummy_setup ___________________________

self = <tests.integration.test_main.TestMain testMethod=test_dummy_setup>

    def tearDown(self):
        self.session.close()
    
        if self.server is not None:
>           self.loop.run_until_complete(self.shutdown_server())

tests/integration/test_main.py:70: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.6/asyncio/base_events.py:467: in run_until_complete
    return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.integration.test_main.TestMain testMethod=test_dummy_setup>

    @asyncio.coroutine
    def shutdown_server(self):
        """Shutdown server."""
        assert self.server is not None
    
        self.server.close()
>       yield from self.handler.finish_connections()
E       AttributeError: 'Server' object has no attribute 'finish_connections'

tests/integration/test_main.py:101: AttributeError
_____________________ TestMain.test_dummy_setup_roundtrip ______________________

self = <tests.integration.test_main.TestMain 
testMethod=test_dummy_setup_roundtrip>

    def tearDown(self):
        self.session.close()
    
        if self.server is not None:
>           self.loop.run_until_complete(self.shutdown_server())

tests/integration/test_main.py:70: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.6/asyncio/base_events.py:467: in run_until_complete
    return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.integration.test_main.TestMain 
testMethod=test_dummy_setup_roundtrip>

    @asyncio.coroutine
    def shutdown_server(self):
        """Shutdown server."""
        assert self.server is not None
    
        self.server.close()
>       yield from self.handler.finish_connections()
E       AttributeError: 'Server' object has no attribute 'finish_connections'

tests/integration/test_main.py:101: AttributeError
_________________ TestMain.test_dummy_setup_roundtrip_resource _________________

self = <tests.integration.test_main.TestMain 
testMethod=test_dummy_setup_roundtrip_resource>

    def tearDown(self):
        self.session.close()
    
        if self.server is not None:
>           self.loop.run_until_complete(self.shutdown_server())

tests/integration/test_main.py:70: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.6/asyncio/base_events.py:467: in run_until_complete
    return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.integration.test_main.TestMain 
testMethod=test_dummy_setup_roundtrip_resource>

    @asyncio.coroutine
    def shutdown_server(self):
        """Shutdown server."""
        assert self.server is not None
    
        self.server.close()
>       yield from self.handler.finish_connections()
E       AttributeError: 'Server' object has no attribute 'finish_connections'

tests/integration/test_main.py:101: AttributeError
_______________________ TestMain.test_message_roundtrip ________________________

self = <tests.integration.test_main.TestMain testMethod=test_message_roundtrip>

    def tearDown(self):
        self.session.close()
    
        if self.server is not None:
>           self.loop.run_until_complete(self.shutdown_server())

tests/integration/test_main.py:70: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.6/asyncio/base_events.py:467: in run_until_complete
    return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.integration.test_main.TestMain testMethod=test_message_roundtrip>

    @asyncio.coroutine
    def shutdown_server(self):
        """Shutdown server."""
        assert self.server is not None
    
        self.server.close()
>       yield from self.handler.finish_connections()
E       AttributeError: 'Server' object has no attribute 'finish_connections'

tests/integration/test_main.py:101: AttributeError
_______________________ TestMain.test_preflight_default ________________________

self = <tests.integration.test_main.TestMain testMethod=test_preflight_default>

    @asynctest
    @asyncio.coroutine
    def test_preflight_default(self):
        """Test CORS preflight requests with a route with the default
            configuration.
    
            The default configuration means that:
              * no credentials are allowed,
              * no headers are exposed,
              * no client headers are allowed.
            """
    
        client1 = "http://client1.example.org";
        client2 = "http://client2.example.org";
    
        tests_descriptions = [
            {
                "name": "default",
                "defaults": None,
                "route_config":
                    {
                        client1: ResourceOptions(),
                    },
                "tests": [
                    {
                        "name": "no origin",
                        "response_status": 403,
                        "in_response": "origin header is not specified",
                        "not_in_response_headers": {
                            hdrs.ACCESS_CONTROL_ALLOW_ORIGIN,
                            hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
                            hdrs.ACCESS_CONTROL_MAX_AGE,
                            hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
                            hdrs.ACCESS_CONTROL_ALLOW_METHODS,
                            hdrs.ACCESS_CONTROL_ALLOW_HEADERS,
                        },
                    },
                    {
                        "name": "no method",
                        "request_headers": {
                            hdrs.ORIGIN: client1,
                        },
                        "response_status": 403,
                        "in_response": "'Access-Control-Request-Method' "
                                       "header is not specified",
                        "not_in_response_headers": {
                            hdrs.ACCESS_CONTROL_ALLOW_ORIGIN,
                            hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
                            hdrs.ACCESS_CONTROL_MAX_AGE,
                            hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
                            hdrs.ACCESS_CONTROL_ALLOW_METHODS,
                            hdrs.ACCESS_CONTROL_ALLOW_HEADERS,
                        },
                    },
                    {
                        "name": "origin and method",
                        "request_headers": {
                            hdrs.ORIGIN: client1,
                            hdrs.ACCESS_CONTROL_REQUEST_METHOD: "GET",
                        },
                        "in_response_headers": {
                            hdrs.ACCESS_CONTROL_ALLOW_ORIGIN: client1,
                            hdrs.ACCESS_CONTROL_ALLOW_METHODS: "GET",
                        },
                        "not_in_response_headers": {
                            hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
                            hdrs.ACCESS_CONTROL_MAX_AGE,
                            hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
                            hdrs.ACCESS_CONTROL_ALLOW_HEADERS,
                        },
                    },
                    {
                        "name": "disallowed origin",
                        "request_headers": {
                            hdrs.ORIGIN: client2,
                            hdrs.ACCESS_CONTROL_REQUEST_METHOD: "GET",
                        },
                        "response_status": 403,
                        "in_response": "origin '{}' is not allowed".format(
                            client2),
                        "not_in_response_headers": {
                            hdrs.ACCESS_CONTROL_ALLOW_ORIGIN,
                            hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
                            hdrs.ACCESS_CONTROL_MAX_AGE,
                            hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
                            hdrs.ACCESS_CONTROL_ALLOW_METHODS,
                            hdrs.ACCESS_CONTROL_ALLOW_HEADERS,
                        },
                    },
                    {
                        "name": "disallowed method",
                        "request_headers": {
                            hdrs.ORIGIN: client1,
                            hdrs.ACCESS_CONTROL_REQUEST_METHOD: "POST",
                        },
                        "response_status": 403,
                        "in_response": "request method 'POST' is not allowed",
                        "not_in_response_headers": {
                            hdrs.ACCESS_CONTROL_ALLOW_ORIGIN,
                            hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
                            hdrs.ACCESS_CONTROL_MAX_AGE,
                            hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
                            hdrs.ACCESS_CONTROL_ALLOW_METHODS,
                            hdrs.ACCESS_CONTROL_ALLOW_HEADERS,
                        },
                    },
                    ],
            },
        ]
    
        yield from self._run_preflight_requests_tests(
>           tests_descriptions, False)

tests/integration/test_main.py:610: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/integration/test_main.py:497: in _run_preflight_requests_tests
    yield from self.shutdown_server()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.integration.test_main.TestMain testMethod=test_preflight_default>

    @asyncio.coroutine
    def shutdown_server(self):
        """Shutdown server."""
        assert self.server is not None
    
        self.server.close()
>       yield from self.handler.finish_connections()
E       AttributeError: 'Server' object has no attribute 'finish_connections'

tests/integration/test_main.py:101: AttributeError
___________________ TestMain.test_preflight_request_headers ____________________

self = <tests.integration.test_main.TestMain 
testMethod=test_preflight_request_headers>

    def tearDown(self):
        self.session.close()
    
        if self.server is not None:
>           self.loop.run_until_complete(self.shutdown_server())

tests/integration/test_main.py:70: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.6/asyncio/base_events.py:467: in run_until_complete
    return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.integration.test_main.TestMain 
testMethod=test_preflight_request_headers>

    @asyncio.coroutine
    def shutdown_server(self):
        """Shutdown server."""
        assert self.server is not None
    
        self.server.close()
>       yield from self.handler.finish_connections()
E       AttributeError: 'Server' object has no attribute 'finish_connections'

tests/integration/test_main.py:101: AttributeError
_______________ TestMain.test_preflight_request_headers_resource _______________

self = <tests.integration.test_main.TestMain 
testMethod=test_preflight_request_headers_resource>

    def tearDown(self):
        self.session.close()
    
        if self.server is not None:
>           self.loop.run_until_complete(self.shutdown_server())

tests/integration/test_main.py:70: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.6/asyncio/base_events.py:467: in run_until_complete
    return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.integration.test_main.TestMain 
testMethod=test_preflight_request_headers_resource>

    @asyncio.coroutine
    def shutdown_server(self):
        """Shutdown server."""
        assert self.server is not None
    
        self.server.close()
>       yield from self.handler.finish_connections()
E       AttributeError: 'Server' object has no attribute 'finish_connections'

tests/integration/test_main.py:101: AttributeError
_______ TestMain.test_preflight_request_multiple_routes_with_one_options _______

self = <tests.integration.test_main.TestMain 
testMethod=test_preflight_request_multiple_routes_with_one_options>

    def tearDown(self):
        self.session.close()
    
        if self.server is not None:
>           self.loop.run_until_complete(self.shutdown_server())

tests/integration/test_main.py:70: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.6/asyncio/base_events.py:467: in run_until_complete
    return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.integration.test_main.TestMain 
testMethod=test_preflight_request_multiple_routes_with_one_options>

    @asyncio.coroutine
    def shutdown_server(self):
        """Shutdown server."""
        assert self.server is not None
    
        self.server.close()
>       yield from self.handler.finish_connections()
E       AttributeError: 'Server' object has no attribute 'finish_connections'

tests/integration/test_main.py:101: AttributeError
__ TestMain.test_preflight_request_multiple_routes_with_one_options_resource ___

self = <tests.integration.test_main.TestMain 
testMethod=test_preflight_request_multiple_routes_with_one_options_resource>

    def tearDown(self):
        self.session.close()
    
        if self.server is not None:
>           self.loop.run_until_complete(self.shutdown_server())

tests/integration/test_main.py:70: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.6/asyncio/base_events.py:467: in run_until_complete
    return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.integration.test_main.TestMain 
testMethod=test_preflight_request_multiple_routes_with_one_options_resource>

    @asyncio.coroutine
    def shutdown_server(self):
        """Shutdown server."""
        assert self.server is not None
    
        self.server.close()
>       yield from self.handler.finish_connections()
E       AttributeError: 'Server' object has no attribute 'finish_connections'

tests/integration/test_main.py:101: AttributeError
_________________________ TestMain.test_simple_default _________________________

self = <tests.integration.test_main.TestMain testMethod=test_simple_default>

    @asynctest
    @asyncio.coroutine
    def test_simple_default(self):
        """Test CORS simple requests with a route with the default
            configuration.
    
            The default configuration means that:
              * no credentials are allowed,
              * no headers are exposed,
              * no client headers are allowed.
            """
    
        client1 = "http://client1.example.org";
        client2 = "http://client2.example.org";
        client1_80 = "http://client1.example.org:80";
        client1_https = "https://client2.example.org";
    
        tests_descriptions = [
            {
                "name": "default",
                "defaults": None,
                "route_config":
                    {
                        client1: ResourceOptions(),
                    },
                "tests": [
                    {
                        "name": "no origin header",
                        "not_in_response_headers": {
                            hdrs.ACCESS_CONTROL_ALLOW_ORIGIN,
                            hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
                            hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
                        }
                    },
                    {
                        "name": "allowed origin",
                        "request_headers": {
                            hdrs.ORIGIN: client1,
                        },
                        "in_response_headers": {
                            hdrs.ACCESS_CONTROL_ALLOW_ORIGIN: client1,
                        },
                        "not_in_response_headers": {
                            hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
                            hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
                        }
                    },
                    {
                        "name": "not allowed origin",
                        "request_headers": {
                            hdrs.ORIGIN: client2,
                        },
                        "not_in_response_headers": {
                            hdrs.ACCESS_CONTROL_ALLOW_ORIGIN,
                            hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
                            hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
                        }
                    },
                    {
                        "name": "explicitly specified default port",
                        # CORS specification says, that origins may compared
                        # as strings, so "example.org:80" is not the same as
                        # "example.org".
                        "request_headers": {
                            hdrs.ORIGIN: client1_80,
                        },
                        "not_in_response_headers": {
                            hdrs.ACCESS_CONTROL_ALLOW_ORIGIN,
                            hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
                            hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
                        }
                    },
                    {
                        "name": "different scheme",
                        "request_headers": {
                            hdrs.ORIGIN: client1_https,
                        },
                        "not_in_response_headers": {
                            hdrs.ACCESS_CONTROL_ALLOW_ORIGIN,
                            hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
                            hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
                        }
                    },
                    ],
            },
        ]
    
>       yield from self._run_simple_requests_tests(tests_descriptions, False)

tests/integration/test_main.py:312: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/integration/test_main.py:223: in _run_simple_requests_tests
    yield from self.shutdown_server()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.integration.test_main.TestMain testMethod=test_simple_default>

    @asyncio.coroutine
    def shutdown_server(self):
        """Shutdown server."""
        assert self.server is not None
    
        self.server.close()
>       yield from self.handler.finish_connections()
E       AttributeError: 'Server' object has no attribute 'finish_connections'

tests/integration/test_main.py:101: AttributeError
_____________________ TestMain.test_simple_expose_headers ______________________

self = <tests.integration.test_main.TestMain 
testMethod=test_simple_expose_headers>

    @asynctest
    @asyncio.coroutine
    def test_simple_expose_headers(self):
        """Test CORS simple requests with a route that exposes header."""
    
        client1 = "http://client1.example.org";
        client2 = "http://client2.example.org";
    
        tests_descriptions = [
            {
                "name": "default",
                "defaults": None,
                "route_config":
                    {
                        client1: ResourceOptions(
                            expose_headers=(SERVER_CUSTOM_HEADER_NAME,)),
                    },
                "tests": [
                    {
                        "name": "no origin header",
                        "not_in_response_headers": {
                            hdrs.ACCESS_CONTROL_ALLOW_ORIGIN,
                            hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
                            hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
                        }
                    },
                    {
                        "name": "allowed origin",
                        "request_headers": {
                            hdrs.ORIGIN: client1,
                        },
                        "in_response_headers": {
                            hdrs.ACCESS_CONTROL_ALLOW_ORIGIN: client1,
                            hdrs.ACCESS_CONTROL_EXPOSE_HEADERS:
                                SERVER_CUSTOM_HEADER_NAME,
                        },
                        "not_in_response_headers": {
                            hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
                        }
                    },
                    {
                        "name": "not allowed origin",
                        "request_headers": {
                            hdrs.ORIGIN: client2,
                        },
                        "not_in_response_headers": {
                            hdrs.ACCESS_CONTROL_ALLOW_ORIGIN,
                            hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
                            hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
                        }
                    },
                    ],
            },
        ]
    
>       yield from self._run_simple_requests_tests(tests_descriptions, False)

tests/integration/test_main.py:442: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/integration/test_main.py:223: in _run_simple_requests_tests
    yield from self.shutdown_server()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.integration.test_main.TestMain 
testMethod=test_simple_expose_headers>

    @asyncio.coroutine
    def shutdown_server(self):
        """Shutdown server."""
        assert self.server is not None
    
        self.server.close()
>       yield from self.handler.finish_connections()
E       AttributeError: 'Server' object has no attribute 'finish_connections'

tests/integration/test_main.py:101: AttributeError
____________________ TestMain.test_simple_with_credentials _____________________

self = <tests.integration.test_main.TestMain 
testMethod=test_simple_with_credentials>

    @asynctest
    @asyncio.coroutine
    def test_simple_with_credentials(self):
        """Test CORS simple requests with a route with enabled authorization.
    
            Route with enabled authorization must return
            Origin: <origin as requested, NOT "*">
            Access-Control-Allow-Credentials: true
            """
    
        client1 = "http://client1.example.org";
        client2 = "http://client2.example.org";
    
        credential_tests = [
            {
                "name": "no origin header",
                "not_in_response_headers": {
                    hdrs.ACCESS_CONTROL_ALLOW_ORIGIN,
                    hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
                    hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
                }
            },
            {
                "name": "allowed origin",
                "request_headers": {
                    hdrs.ORIGIN: client1,
                },
                "in_response_headers": {
                    hdrs.ACCESS_CONTROL_ALLOW_ORIGIN: client1,
                    hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS: "true",
                },
                "not_in_response_headers": {
                    hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
                }
            },
            {
                "name": "disallowed origin",
                "request_headers": {
                    hdrs.ORIGIN: client2,
                },
                "not_in_response_headers": {
                    hdrs.ACCESS_CONTROL_ALLOW_ORIGIN,
                    hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
                    hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
                }
            },
        ]
    
        tests_descriptions = [
            {
                "name": "route settings",
                "defaults": None,
                "route_config":
                    {
                        client1: ResourceOptions(allow_credentials=True),
                    },
                "tests": credential_tests,
            },
            {
                "name": "cors default settings",
                "defaults":
                    {
                        client1: ResourceOptions(allow_credentials=True),
                    },
                "route_config": None,
                "tests": credential_tests,
            },
        ]
    
>       yield from self._run_simple_requests_tests(tests_descriptions, False)

tests/integration/test_main.py:384: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/integration/test_main.py:223: in _run_simple_requests_tests
    yield from self.shutdown_server()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.integration.test_main.TestMain 
testMethod=test_simple_with_credentials>

    @asyncio.coroutine
    def shutdown_server(self):
        """Shutdown server."""
        assert self.server is not None
    
        self.server.close()
>       yield from self.handler.finish_connections()
E       AttributeError: 'Server' object has no attribute 'finish_connections'

tests/integration/test_main.py:101: AttributeError
__________________________ TestMain.test_static_route __________________________

self = <tests.integration.test_main.TestMain testMethod=test_static_route>

    def tearDown(self):
        self.session.close()
    
        if self.server is not None:
>           self.loop.run_until_complete(self.shutdown_server())

tests/integration/test_main.py:70: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.6/asyncio/base_events.py:467: in run_until_complete
    return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.integration.test_main.TestMain testMethod=test_static_route>

    @asyncio.coroutine
    def shutdown_server(self):
        """Shutdown server."""
        assert self.server is not None
    
        self.server.close()
>       yield from self.handler.finish_connections()
E       AttributeError: 'Server' object has no attribute 'finish_connections'

tests/integration/test_main.py:101: AttributeError
============================== 4 tests deselected ==============================
========= 13 failed, 14 passed, 4 deselected, 4 error in 2.95 seconds ==========
Task was destroyed but it is pending!
task: <Task pending coro=<RequestHandler.start() running at 
/usr/lib/python3/dist-packages/aiohttp/web_protocol.py:494> wait_for=<Future 
pending cb=[<TaskWakeupMethWrapper object at 0x7fccc10111c8>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<RequestHandler.start() running at 
/usr/lib/python3/dist-packages/aiohttp/web_protocol.py:494> wait_for=<Future 
pending cb=[<TaskWakeupMethWrapper object at 0x7fccc37cb7f8>()]>>
E: pybuild pybuild:283: test: plugin distutils failed with: exit code=1: cd 
/build/1st/aiohttp-cors-0.5.3/.pybuild/pythonX.Y_3.6/build; python3.6 -m pytest 
-k-tests/integration/test_real_browser.py
dh_auto_test: pybuild --test -i python{version} -p 3.6 returned exit code 13
debian/rules:8: recipe for target 'build' failed
make: *** [build] Error 25

Reply via email to