()
| 193 | |
| 194 | @pytest.mark.anyio |
| 195 | async def test_basic_auth_in_url() -> None: |
| 196 | url = "https://user:password123@example.org/" |
| 197 | app = App() |
| 198 | |
| 199 | async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client: |
| 200 | response = await client.get(url) |
| 201 | |
| 202 | assert response.status_code == 200 |
| 203 | assert response.json() == {"auth": "Basic dXNlcjpwYXNzd29yZDEyMw=="} |
| 204 | |
| 205 | |
| 206 | @pytest.mark.anyio |