@@ -80,7 +80,7 @@ def test_shows_waitlist_form_when_not_logged_in(
8080 ).mock (return_value = Response (200 ))
8181
8282 with changing_dir (tmp_path ), patch (
83- "rich_toolkit.menu.click .getchar"
83+ "rich_toolkit.container .getchar"
8484 ) as mock_getchar :
8585 mock_getchar .side_effect = steps
8686
@@ -138,7 +138,7 @@ def test_shows_waitlist_form_when_not_logged_in_longer_flow(
138138 ).mock (return_value = Response (200 ))
139139
140140 with changing_dir (tmp_path ), patch (
141- "rich_toolkit.menu.click .getchar"
141+ "rich_toolkit.container .getchar"
142142 ) as mock_getchar :
143143 mock_getchar .side_effect = steps
144144
@@ -153,7 +153,7 @@ def test_asks_to_setup_the_app(logged_in_cli: None, tmp_path: Path) -> None:
153153 steps = [Keys .RIGHT_ARROW , Keys .ENTER ]
154154
155155 with changing_dir (tmp_path ), patch (
156- "rich_toolkit.menu.click .getchar"
156+ "rich_toolkit.container .getchar"
157157 ) as mock_getchar :
158158 mock_getchar .side_effect = steps
159159
@@ -171,7 +171,7 @@ def test_shows_error_when_trying_to_get_teams(
171171
172172 respx_mock .get ("/teams/" ).mock (return_value = Response (500 ))
173173
174- with changing_dir (tmp_path ), patch ("click .getchar" ) as mock_getchar :
174+ with changing_dir (tmp_path ), patch ("rich_toolkit.container .getchar" ) as mock_getchar :
175175 mock_getchar .side_effect = steps
176176
177177 result = runner .invoke (app , ["deploy" ])
@@ -189,7 +189,7 @@ def test_handles_invalid_auth(
189189
190190 respx_mock .get ("/teams/" ).mock (return_value = Response (401 ))
191191
192- with changing_dir (tmp_path ), patch ("click .getchar" ) as mock_getchar :
192+ with changing_dir (tmp_path ), patch ("rich_toolkit.container .getchar" ) as mock_getchar :
193193 mock_getchar .side_effect = steps
194194
195195 result = runner .invoke (app , ["deploy" ])
@@ -215,7 +215,7 @@ def test_shows_teams(
215215 )
216216 )
217217
218- with changing_dir (tmp_path ), patch ("click .getchar" ) as mock_getchar :
218+ with changing_dir (tmp_path ), patch ("rich_toolkit.container .getchar" ) as mock_getchar :
219219 mock_getchar .side_effect = steps
220220
221221 result = runner .invoke (app , ["deploy" ])
@@ -239,7 +239,7 @@ def test_asks_for_app_name_after_team(
239239 )
240240 )
241241
242- with changing_dir (tmp_path ), patch ("click .getchar" ) as mock_getchar :
242+ with changing_dir (tmp_path ), patch ("rich_toolkit.container .getchar" ) as mock_getchar :
243243 mock_getchar .side_effect = steps
244244
245245 result = runner .invoke (app , ["deploy" ])
@@ -268,7 +268,7 @@ def test_creates_app_on_backend(
268268 return_value = Response (201 , json = _get_random_app (team_id = team ["id" ]))
269269 )
270270
271- with changing_dir (tmp_path ), patch ("click .getchar" ) as mock_getchar :
271+ with changing_dir (tmp_path ), patch ("rich_toolkit.container .getchar" ) as mock_getchar :
272272 mock_getchar .side_effect = steps
273273
274274 result = runner .invoke (app , ["deploy" ])
@@ -294,7 +294,7 @@ def test_uses_existing_app(
294294 return_value = Response (200 , json = {"data" : [app_data ]})
295295 )
296296
297- with changing_dir (tmp_path ), patch ("click .getchar" ) as mock_getchar :
297+ with changing_dir (tmp_path ), patch ("rich_toolkit.container .getchar" ) as mock_getchar :
298298 mock_getchar .side_effect = steps
299299
300300 result = runner .invoke (app , ["deploy" ])
@@ -367,7 +367,7 @@ def test_exits_successfully_when_deployment_is_done(
367367 )
368368 )
369369
370- with changing_dir (tmp_path ), patch ("click .getchar" ) as mock_getchar :
370+ with changing_dir (tmp_path ), patch ("rich_toolkit.container .getchar" ) as mock_getchar :
371371 mock_getchar .side_effect = steps
372372
373373 result = runner .invoke (app , ["deploy" ])
@@ -615,7 +615,7 @@ def _deploy_without_waiting(respx_mock: respx.MockRouter, tmp_path: Path) -> Res
615615 return_value = Response (200 )
616616 )
617617
618- with changing_dir (tmp_path ), patch ("click .getchar" ) as mock_getchar :
618+ with changing_dir (tmp_path ), patch ("rich_toolkit.container .getchar" ) as mock_getchar :
619619 mock_getchar .side_effect = steps
620620
621621 return runner .invoke (app , ["deploy" , "--no-wait" ])
@@ -687,7 +687,7 @@ def test_creates_environment_variables_during_app_setup(
687687 f"/apps/{ app_data ['id' ]} /environment-variables/" , json = {"API_KEY" : "secret123" }
688688 ).mock (return_value = Response (200 ))
689689
690- with changing_dir (tmp_path ), patch ("click .getchar" ) as mock_getchar :
690+ with changing_dir (tmp_path ), patch ("rich_toolkit.container .getchar" ) as mock_getchar :
691691 mock_getchar .side_effect = steps
692692
693693 result = runner .invoke (app , ["deploy" ])
@@ -731,7 +731,7 @@ def test_rejects_invalid_environment_variable_names(
731731 f"/apps/{ app_data ['id' ]} /environment-variables/" , json = {"VALID_KEY" : "value123" }
732732 ).mock (return_value = Response (200 ))
733733
734- with changing_dir (tmp_path ), patch ("click .getchar" ) as mock_getchar :
734+ with changing_dir (tmp_path ), patch ("rich_toolkit.container .getchar" ) as mock_getchar :
735735 mock_getchar .side_effect = steps
736736
737737 result = runner .invoke (app , ["deploy" ])
@@ -754,7 +754,7 @@ def test_shows_error_for_invalid_waitlist_form_data(
754754 ]
755755
756756 with changing_dir (tmp_path ), patch (
757- "rich_toolkit.menu.click .getchar"
757+ "rich_toolkit.container .getchar"
758758 ) as mock_getchar , patch ("rich_toolkit.form.Form.run" ) as mock_form_run :
759759 mock_getchar .side_effect = steps
760760 # Simulate form returning data with invalid email field to trigger ValidationError
@@ -789,7 +789,7 @@ def test_shows_no_apps_found_message_when_team_has_no_apps(
789789 return_value = Response (200 , json = {"data" : []})
790790 )
791791
792- with changing_dir (tmp_path ), patch ("click .getchar" ) as mock_getchar :
792+ with changing_dir (tmp_path ), patch ("rich_toolkit.container .getchar" ) as mock_getchar :
793793 mock_getchar .side_effect = steps
794794
795795 result = runner .invoke (app , ["deploy" ])
0 commit comments