mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-10-21 14:51:49 +02:00
feat: agent takeover, batches
This commit is contained in:
1 parent
e28afa5b13
commit
7658833904
28 files changed
+1512
-101
No files matched your search
@@ -90,3 +90,14 @@ def test_the_cdp_url_is_refused_before_the_block(client: DonutClient) -> None:
|
||||
session = client.run("p1")
|
||||
with pytest.raises(DonutError):
|
||||
_ = session.cdp_url
|
||||
|
||||
|
||||
def test_a_browser_taken_over_is_left_running(client: DonutClient, fake: FakeDonut) -> None:
|
||||
fake.enqueue_json({**RUN_BODY, "attached": True})
|
||||
|
||||
with client.run("p1") as session:
|
||||
assert session.attached is True
|
||||
|
||||
assert [(sent.method, sent.path) for sent in fake.requests] == [
|
||||
("POST", "/v1/profiles/p1/run"),
|
||||
]
|
||||
Reference in new issue
Block a user