(self)
| 241 | assert Authorization.from_header(f"Basic {content}") is None |
| 242 | |
| 243 | def test_authorization_eq(self): |
| 244 | basic1 = Authorization.from_header("Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==") |
| 245 | basic2 = Authorization( |
| 246 | "basic", {"username": "Aladdin", "password": "open sesame"} |
| 247 | ) |
| 248 | assert basic1 == basic2 |
| 249 | bearer1 = Authorization.from_header("Bearer abc") |
| 250 | bearer2 = Authorization("bearer", token="abc") |
| 251 | assert bearer1 == bearer2 |
| 252 | assert basic1 != bearer1 |
| 253 | assert basic1 != object() |
| 254 | |
| 255 | def test_www_authenticate_header(self): |
| 256 | wa = WWWAuthenticate.from_header('Basic realm="WallyWorld"') |
nothing calls this directly
no test coverage detected