def test_bad_authorization_header_encoding(self):
        """If the base64 encoded bytes can't be decoded as UTF-8"""
        content = base64.b64encode(b"\xffser:pass").decode()
        assert Authorization.from_header(f"Basic {content}") is None
If the base64 encoded bytes can't be decoded as UTF-8
tests/test_http.py