Exemple #1
0
def test_headers_keys():
    headers = [XHeader(name='A', value='a'), XHeader(name='B', value='b')]
    h = SpamcHeaders(headers=headers)
    header_fields = [header.field_name() for header in headers]

    for test_result in h.keys():
        assert test_result in header_fields
Exemple #2
0
def test_headers_keys():
    h = SpamcHeaders(headers={
        'A': GenericHeaderValue(value='a'),
        'B': GenericHeaderValue(value='b')
    })

    for test_result in h.keys():
        assert test_result in ['A', 'B']