()
| 505 | |
| 506 | |
| 507 | def test_invalid_subdomain_warning(): |
| 508 | env = create_environ("/foo") |
| 509 | env["SERVER_NAME"] = env["HTTP_HOST"] = "foo.example.com" |
| 510 | m = r.Map([r.Rule("/foo", endpoint="foo")]) |
| 511 | with pytest.warns(UserWarning) as record: |
| 512 | a = m.bind_to_environ(env, server_name="bar.example.com") |
| 513 | assert a.subdomain == "<invalid>" |
| 514 | assert len(record) == 1 |
| 515 | |
| 516 | |
| 517 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected