@@ -103,7 +103,7 @@ def test_clamped_wait_timeout_allows_execute(self):
103103
104104 with tempfile .TemporaryDirectory () as tmp :
105105 engine = ScraperEngine (settings = get_settings (), runtime_root = Path (tmp ))
106- with patch ("app.engine.browser_tier .Driver" , FakeDriver ):
106+ with patch ("botasaurus.browser .Driver" , FakeDriver ):
107107 result = engine .execute (payload )
108108
109109 self .assertIsNone (result .error if isinstance (result , ScrapeError ) else None )
@@ -126,7 +126,7 @@ def test_html_response_sets_utf8_content_type_and_normalizes_body(self):
126126
127127 with tempfile .TemporaryDirectory () as tmp :
128128 engine = ScraperEngine (settings = get_settings (), runtime_root = Path (tmp ))
129- with patch ("app.engine.request_tier .Request" , FakeRequest ):
129+ with patch ("botasaurus.request .Request" , FakeRequest ):
130130 result = engine .execute (payload )
131131
132132 self .assertIsInstance (result , ScrapeSuccess )
@@ -155,7 +155,7 @@ def test_utf8_normalize_leaves_correct_unicode_unchanged(self):
155155 payload = ScrapeRequest (url = "https://example.com" , execution_mode = "request" )
156156 with tempfile .TemporaryDirectory () as tmp :
157157 engine = ScraperEngine (settings = get_settings (), runtime_root = Path (tmp ))
158- with patch ("app.engine.request_tier .Request" , FakeRequest ):
158+ with patch ("botasaurus.request .Request" , FakeRequest ):
159159 result = engine .execute (payload )
160160
161161 self .assertEqual (result .html , html )
@@ -176,8 +176,8 @@ def test_request_tier_blocked_status_escalates_to_browser(self):
176176 settings = get_settings (), runtime_root = Path (tmp )
177177 )
178178 with (
179- patch ("app.engine.request_tier .Request" , FakeRequest ),
180- patch ("app.engine.browser_tier .Driver" , ArticleDriver ),
179+ patch ("botasaurus.request .Request" , FakeRequest ),
180+ patch ("botasaurus.browser .Driver" , ArticleDriver ),
181181 ):
182182 result = engine .execute (payload )
183183
@@ -230,7 +230,7 @@ def test_cleanup_runs_on_navigation_error(self):
230230 with tempfile .TemporaryDirectory () as tmp :
231231 runtime_root = Path (tmp )
232232 engine = ScraperEngine (settings = get_settings (), runtime_root = runtime_root )
233- with patch ("app.engine.browser_tier .Driver" , FakeDriver ):
233+ with patch ("botasaurus.browser .Driver" , FakeDriver ):
234234 result = engine .execute (payload )
235235
236236 self .assertEqual (result .error_category , ErrorCategory .NAVIGATION_ERROR )
@@ -254,7 +254,7 @@ def boom_mkdir(*_args, exist_ok=False, **_kwargs):
254254 raise OSError (28 , "No space left on device" )
255255
256256 with (
257- patch ("app.engine.browser_tier .Driver" , FakeDriver ),
257+ patch ("botasaurus.browser .Driver" , FakeDriver ),
258258 patch .object (Path , "mkdir" , side_effect = boom_mkdir ),
259259 ):
260260 result = engine .execute (payload )
@@ -279,7 +279,7 @@ def test_prune_orphan_runtime_dirs_before_new_request(self):
279279 (orphan / "profile" ).mkdir ()
280280
281281 engine = ScraperEngine (settings = get_settings (), runtime_root = runtime_root )
282- with patch ("app.engine.browser_tier .Driver" , FakeDriver ):
282+ with patch ("botasaurus.browser .Driver" , FakeDriver ):
283283 result = engine .execute (payload )
284284
285285 self .assertIsInstance (result , ScrapeSuccess )
@@ -308,7 +308,7 @@ def test_prune_orphan_runtime_dirs_before_http_request(self):
308308 (orphan / "profile" ).mkdir ()
309309
310310 engine = ScraperEngine (settings = get_settings (), runtime_root = runtime_root )
311- with patch ("app.engine.request_tier .Request" , FakeRequest ):
311+ with patch ("botasaurus.request .Request" , FakeRequest ):
312312 result = engine .execute (payload )
313313
314314 self .assertEqual (result .html , html )
@@ -333,7 +333,7 @@ def test_run_scrape_forwards_driver_kwargs(self):
333333 with tempfile .TemporaryDirectory () as tmp :
334334 runtime_root = Path (tmp )
335335 engine = ScraperEngine (settings = get_settings (), runtime_root = runtime_root )
336- with patch ("app.engine.browser_tier .Driver" , CaptureDriver ):
336+ with patch ("botasaurus.browser .Driver" , CaptureDriver ):
337337 result = engine .execute (payload )
338338
339339 self .assertIsInstance (result , ScrapeSuccess )
0 commit comments