def test_skip_default_useragent_header(self):
        req = ClientRequest('get',
                            'http://python.org/',
                            loop=self.loop,
                            skip_auto_headers=set([upstr('user-agent')]))

        self.assertNotIn('User-Agent', req.headers)
Example #2
0
def test_skip_default_useragent_header(make_request):
    req = make_request('get', 'http://python.org/',
                       skip_auto_headers=set([upstr('user-agent')]))

    assert 'User-Agent' not in req.headers
Example #3
0
    def test_skip_default_useragent_header(self):
        req = ClientRequest('get', 'http://python.org/', loop=self.loop,
                            skip_auto_headers=set([upstr('user-agent')]))

        self.assertNotIn('User-Agent', req.headers)
Example #4
0
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015 Alexander Shorin
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
# you should have received as part of this distribution.
#

from aiohttp.hdrs import *  # pylint: disable=W0401, W0614
from aiohttp.multidict import upstr

#: Defines CouchDB Proxy Auth username
X_AUTH_COUCHDB_USERNAME = upstr('X-Auth-CouchDB-UserName')
#: Defines CouchDB Proxy Auth list of roles separated by a comma
X_AUTH_COUCHDB_ROLES = upstr('X-Auth-CouchDB-Roles')
#: Defines CouchDB Proxy Auth token
X_AUTH_COUCHDB_TOKEN = upstr('X-Auth-CouchDB-Token')
Example #5
0
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2016 Alexander Shorin
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
# you should have received as part of this distribution.
#

# flake8: noqa

from aiohttp.hdrs import *
from aiohttp.multidict import upstr

#: Defines CouchDB Proxy Auth username
X_AUTH_COUCHDB_USERNAME = upstr('X-Auth-CouchDB-UserName')
#: Defines CouchDB Proxy Auth list of roles separated by a comma
X_AUTH_COUCHDB_ROLES = upstr('X-Auth-CouchDB-Roles')
#: Defines CouchDB Proxy Auth token
X_AUTH_COUCHDB_TOKEN = upstr('X-Auth-CouchDB-Token')
Example #6
0
def test_skip_default_useragent_header(make_request):
    req = make_request('get',
                       'http://python.org/',
                       skip_auto_headers=set([upstr('user-agent')]))

    assert 'User-Agent' not in req.headers
Example #7
0
    def test_skip_default_useragent_header(self):
        req = ClientRequest("get", "http://python.org/", loop=self.loop, skip_auto_headers=set([upstr("user-agent")]))

        self.assertNotIn("User-Agent", req.headers)