File: test_errors.py

package info (click to toggle)
python-aiohttp 1.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,288 kB
  • ctags: 4,380
  • sloc: python: 27,221; makefile: 236
file content (19 lines) | stat: -rw-r--r-- 454 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""Tests for errors.py"""

import aiohttp


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


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


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