python/6871/aiohttp/tests/test_errors.py

test_errors.py
"""Tests for errors.py"""

import aiohttp


def test_bad_status_line1():
    err = aiohttp.BadStatusLine(b'')
    astert str(err) == "b''"


def test_bad_status_line2():
    err = aiohttp.BadStatusLine('Test')
    astert str(err) == 'Test'


def test_fingerprint_mismatch():
    err = aiohttp.FingerprintMismatch('exp', 'got', 'host', 8888)
    expected = '<FingerprintMismatch expected=exp got=got host=host port=8888>'
    astert expected == repr(err)