|
13 | 13 |
|
14 | 14 |
|
15 | 15 | def test_regular(session: HttpSession): |
16 | | - session.get("https://locust.cloud/") |
| 16 | + session.get("https://www.locust.cloud/") |
17 | 17 |
|
18 | 18 |
|
19 | 19 | def test_fasthttp(fastsession: FastHttpSession): |
20 | | - fastsession.get("https://locust.cloud/") |
| 20 | + fastsession.get("https://www.locust.cloud/") |
21 | 21 |
|
22 | 22 |
|
23 | 23 | @pytest.mark.xfail(strict=True) |
24 | 24 | def test_failure(session: HttpSession): |
25 | | - session.get("https://locust.cloud/") |
26 | | - resp = session.get("https://locust.cloud/doesnt_exist") |
| 25 | + session.get("https://www.locust.cloud/") |
| 26 | + resp = session.get("https://www.locust.cloud/doesnt_exist") |
27 | 27 | # the next line will raise a requests.Exception, which will be caught and ignored by Locust. |
28 | 28 | # It still prevents the test from going to the next statement, and is useful for failing the test case when run as pytest |
29 | 29 | resp.raise_for_status() |
30 | | - session.get("https://locust.cloud/will_never_run") |
| 30 | + session.get("https://www.locust.cloud/will_never_run") |
31 | 31 |
|
32 | 32 |
|
33 | 33 | def test_catch_response(session: HttpSession): |
34 | | - with session.get("https://locust.cloud/", catch_response=True) as resp: |
| 34 | + with session.get("https://www.locust.cloud/", catch_response=True) as resp: |
35 | 35 | if not resp.text or not "asdfasdf" in resp.text: |
36 | 36 | resp.failure("important text was missing in response") |
37 | 37 | pytest.raises(CatchResponseError, resp.raise_for_status) |
38 | 38 |
|
39 | 39 |
|
40 | 40 | def test_fasthttp_catch_response(fastsession: FastHttpSession): |
41 | | - with fastsession.get("https://locust.cloud/", catch_response=True) as resp: |
| 41 | + with fastsession.get("https://www.locust.cloud/", catch_response=True) as resp: |
42 | 42 | if not resp.text or not "asdfasdf" in resp.text: |
43 | 43 | resp.failure("important text was missing in response") |
44 | 44 | pytest.raises(CatchResponseError, resp.raise_for_status) |
45 | 45 |
|
46 | 46 |
|
47 | 47 | @pytest.mark.xfail(strict=True) |
48 | 48 | def test_fasthttp_failure(fastsession: FastHttpSession): |
49 | | - fastsession.get("https://locust.cloud/") |
50 | | - resp = fastsession.get("https://locust.cloud/doesnt_exist") |
| 49 | + fastsession.get("https://www.locust.cloud/") |
| 50 | + resp = fastsession.get("https://www.locust.cloud/doesnt_exist") |
51 | 51 | # the next line will raise a requests.Exception, which will be caught and ignored by Locust. |
52 | 52 | # It still prevents the test from going to the next statement, and is useful for failing the test case when run as pytest |
53 | 53 | resp.raise_for_status() |
54 | | - fastsession.get("https://locust.cloud/will_never_run") |
| 54 | + fastsession.get("https://www.locust.cloud/will_never_run") |
| 55 | + |
| 56 | + |
| 57 | +host = "https://www.locust.cloud/" |
55 | 58 |
|
56 | 59 |
|
57 | 60 | def test_host(fastsession: FastHttpSession): |
|
0 commit comments