|
13 | 13 | SessionActResponse, |
14 | 14 | SessionEndResponse, |
15 | 15 | SessionStartResponse, |
| 16 | + SessionReplayResponse, |
16 | 17 | SessionExecuteResponse, |
17 | 18 | SessionExtractResponse, |
18 | 19 | SessionObserveResponse, |
@@ -677,6 +678,57 @@ def test_path_params_observe_overload_2(self, client: Stagehand) -> None: |
677 | 678 | stream_response=True, |
678 | 679 | ) |
679 | 680 |
|
| 681 | + @pytest.mark.skip(reason="Prism tests are disabled") |
| 682 | + @parametrize |
| 683 | + def test_method_replay(self, client: Stagehand) -> None: |
| 684 | + session = client.sessions.replay( |
| 685 | + id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123", |
| 686 | + ) |
| 687 | + assert_matches_type(SessionReplayResponse, session, path=["response"]) |
| 688 | + |
| 689 | + @pytest.mark.skip(reason="Prism tests are disabled") |
| 690 | + @parametrize |
| 691 | + def test_method_replay_with_all_params(self, client: Stagehand) -> None: |
| 692 | + session = client.sessions.replay( |
| 693 | + id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123", |
| 694 | + x_stream_response="true", |
| 695 | + ) |
| 696 | + assert_matches_type(SessionReplayResponse, session, path=["response"]) |
| 697 | + |
| 698 | + @pytest.mark.skip(reason="Prism tests are disabled") |
| 699 | + @parametrize |
| 700 | + def test_raw_response_replay(self, client: Stagehand) -> None: |
| 701 | + response = client.sessions.with_raw_response.replay( |
| 702 | + id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123", |
| 703 | + ) |
| 704 | + |
| 705 | + assert response.is_closed is True |
| 706 | + assert response.http_request.headers.get("X-Stainless-Lang") == "python" |
| 707 | + session = response.parse() |
| 708 | + assert_matches_type(SessionReplayResponse, session, path=["response"]) |
| 709 | + |
| 710 | + @pytest.mark.skip(reason="Prism tests are disabled") |
| 711 | + @parametrize |
| 712 | + def test_streaming_response_replay(self, client: Stagehand) -> None: |
| 713 | + with client.sessions.with_streaming_response.replay( |
| 714 | + id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123", |
| 715 | + ) as response: |
| 716 | + assert not response.is_closed |
| 717 | + assert response.http_request.headers.get("X-Stainless-Lang") == "python" |
| 718 | + |
| 719 | + session = response.parse() |
| 720 | + assert_matches_type(SessionReplayResponse, session, path=["response"]) |
| 721 | + |
| 722 | + assert cast(Any, response.is_closed) is True |
| 723 | + |
| 724 | + @pytest.mark.skip(reason="Prism tests are disabled") |
| 725 | + @parametrize |
| 726 | + def test_path_params_replay(self, client: Stagehand) -> None: |
| 727 | + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): |
| 728 | + client.sessions.with_raw_response.replay( |
| 729 | + id="", |
| 730 | + ) |
| 731 | + |
680 | 732 | @pytest.mark.skip(reason="Prism tests are disabled") |
681 | 733 | @parametrize |
682 | 734 | def test_method_start(self, client: Stagehand) -> None: |
@@ -1457,6 +1509,57 @@ async def test_path_params_observe_overload_2(self, async_client: AsyncStagehand |
1457 | 1509 | stream_response=True, |
1458 | 1510 | ) |
1459 | 1511 |
|
| 1512 | + @pytest.mark.skip(reason="Prism tests are disabled") |
| 1513 | + @parametrize |
| 1514 | + async def test_method_replay(self, async_client: AsyncStagehand) -> None: |
| 1515 | + session = await async_client.sessions.replay( |
| 1516 | + id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123", |
| 1517 | + ) |
| 1518 | + assert_matches_type(SessionReplayResponse, session, path=["response"]) |
| 1519 | + |
| 1520 | + @pytest.mark.skip(reason="Prism tests are disabled") |
| 1521 | + @parametrize |
| 1522 | + async def test_method_replay_with_all_params(self, async_client: AsyncStagehand) -> None: |
| 1523 | + session = await async_client.sessions.replay( |
| 1524 | + id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123", |
| 1525 | + x_stream_response="true", |
| 1526 | + ) |
| 1527 | + assert_matches_type(SessionReplayResponse, session, path=["response"]) |
| 1528 | + |
| 1529 | + @pytest.mark.skip(reason="Prism tests are disabled") |
| 1530 | + @parametrize |
| 1531 | + async def test_raw_response_replay(self, async_client: AsyncStagehand) -> None: |
| 1532 | + response = await async_client.sessions.with_raw_response.replay( |
| 1533 | + id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123", |
| 1534 | + ) |
| 1535 | + |
| 1536 | + assert response.is_closed is True |
| 1537 | + assert response.http_request.headers.get("X-Stainless-Lang") == "python" |
| 1538 | + session = await response.parse() |
| 1539 | + assert_matches_type(SessionReplayResponse, session, path=["response"]) |
| 1540 | + |
| 1541 | + @pytest.mark.skip(reason="Prism tests are disabled") |
| 1542 | + @parametrize |
| 1543 | + async def test_streaming_response_replay(self, async_client: AsyncStagehand) -> None: |
| 1544 | + async with async_client.sessions.with_streaming_response.replay( |
| 1545 | + id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123", |
| 1546 | + ) as response: |
| 1547 | + assert not response.is_closed |
| 1548 | + assert response.http_request.headers.get("X-Stainless-Lang") == "python" |
| 1549 | + |
| 1550 | + session = await response.parse() |
| 1551 | + assert_matches_type(SessionReplayResponse, session, path=["response"]) |
| 1552 | + |
| 1553 | + assert cast(Any, response.is_closed) is True |
| 1554 | + |
| 1555 | + @pytest.mark.skip(reason="Prism tests are disabled") |
| 1556 | + @parametrize |
| 1557 | + async def test_path_params_replay(self, async_client: AsyncStagehand) -> None: |
| 1558 | + with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): |
| 1559 | + await async_client.sessions.with_raw_response.replay( |
| 1560 | + id="", |
| 1561 | + ) |
| 1562 | + |
1460 | 1563 | @pytest.mark.skip(reason="Prism tests are disabled") |
1461 | 1564 | @parametrize |
1462 | 1565 | async def test_method_start(self, async_client: AsyncStagehand) -> None: |
|
0 commit comments