'Preserve order when headers provided as OrderedDict.'

def test_headers_preserve_order(self, httpbin):

    ses = requests.Session()
    ses.headers = OrderedDict()
    ses.headers['Accept-Encoding'] = 'identity'
    ses.headers['First'] = '1'
    ses.headers['Second'] = '2'
    headers = OrderedDict([('Third', '3'), ('Fourth', '4')])
    headers['Fifth'] = '5'
    headers['Second'] = '222'
    req = requests.Request('GET', httpbin('get'), headers=headers)
    prep = ses.prepare_request(req)
    items = list(prep.headers.items())
    assert (items[0] == ('Accept-Encoding', 'identity'))
    assert (items[1] == ('First', '1'))
    assert (items[2] == ('Second', '222'))
    assert (items[3] == ('Third', '3'))
    assert (items[4] == ('Fourth', '4'))
    assert (items[5] == ('Fifth', '5'))
