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
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']