()
| 21 | |
| 22 | |
| 23 | def test_charset_text_pairs(): |
| 24 | # Verify our test data is legit. |
| 25 | for charset, text in CHARSET_TEXT_PAIRS: |
| 26 | assert len(text) > TOO_SMALL_SEQUENCE |
| 27 | if charset != UTF8: |
| 28 | with pytest.raises(UnicodeDecodeError): |
| 29 | assert text != text.encode(charset).decode(UTF8) |
| 30 | |
| 31 | |
| 32 | def test_unicode_headers(httpbin): |