@@ -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,9 @@ 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 (
175+ "rich_toolkit.container.getchar"
176+ ) as mock_getchar :
175177 mock_getchar .side_effect = steps
176178
177179 result = runner .invoke (app , ["deploy" ])
@@ -189,7 +191,9 @@ def test_handles_invalid_auth(
189191
190192 respx_mock .get ("/teams/" ).mock (return_value = Response (401 ))
191193
192- with changing_dir (tmp_path ), patch ("click.getchar" ) as mock_getchar :
194+ with changing_dir (tmp_path ), patch (
195+ "rich_toolkit.container.getchar"
196+ ) as mock_getchar :
193197 mock_getchar .side_effect = steps
194198
195199 result = runner .invoke (app , ["deploy" ])
@@ -215,7 +219,9 @@ def test_shows_teams(
215219 )
216220 )
217221
218- with changing_dir (tmp_path ), patch ("click.getchar" ) as mock_getchar :
222+ with changing_dir (tmp_path ), patch (
223+ "rich_toolkit.container.getchar"
224+ ) as mock_getchar :
219225 mock_getchar .side_effect = steps
220226
221227 result = runner .invoke (app , ["deploy" ])
@@ -239,7 +245,9 @@ def test_asks_for_app_name_after_team(
239245 )
240246 )
241247
242- with changing_dir (tmp_path ), patch ("click.getchar" ) as mock_getchar :
248+ with changing_dir (tmp_path ), patch (
249+ "rich_toolkit.container.getchar"
250+ ) as mock_getchar :
243251 mock_getchar .side_effect = steps
244252
245253 result = runner .invoke (app , ["deploy" ])
@@ -268,7 +276,9 @@ def test_creates_app_on_backend(
268276 return_value = Response (201 , json = _get_random_app (team_id = team ["id" ]))
269277 )
270278
271- with changing_dir (tmp_path ), patch ("click.getchar" ) as mock_getchar :
279+ with changing_dir (tmp_path ), patch (
280+ "rich_toolkit.container.getchar"
281+ ) as mock_getchar :
272282 mock_getchar .side_effect = steps
273283
274284 result = runner .invoke (app , ["deploy" ])
@@ -294,7 +304,9 @@ def test_uses_existing_app(
294304 return_value = Response (200 , json = {"data" : [app_data ]})
295305 )
296306
297- with changing_dir (tmp_path ), patch ("click.getchar" ) as mock_getchar :
307+ with changing_dir (tmp_path ), patch (
308+ "rich_toolkit.container.getchar"
309+ ) as mock_getchar :
298310 mock_getchar .side_effect = steps
299311
300312 result = runner .invoke (app , ["deploy" ])
@@ -367,7 +379,9 @@ def test_exits_successfully_when_deployment_is_done(
367379 )
368380 )
369381
370- with changing_dir (tmp_path ), patch ("click.getchar" ) as mock_getchar :
382+ with changing_dir (tmp_path ), patch (
383+ "rich_toolkit.container.getchar"
384+ ) as mock_getchar :
371385 mock_getchar .side_effect = steps
372386
373387 result = runner .invoke (app , ["deploy" ])
@@ -615,7 +629,9 @@ def _deploy_without_waiting(respx_mock: respx.MockRouter, tmp_path: Path) -> Res
615629 return_value = Response (200 )
616630 )
617631
618- with changing_dir (tmp_path ), patch ("click.getchar" ) as mock_getchar :
632+ with changing_dir (tmp_path ), patch (
633+ "rich_toolkit.container.getchar"
634+ ) as mock_getchar :
619635 mock_getchar .side_effect = steps
620636
621637 return runner .invoke (app , ["deploy" , "--no-wait" ])
@@ -687,7 +703,9 @@ def test_creates_environment_variables_during_app_setup(
687703 f"/apps/{ app_data ['id' ]} /environment-variables/" , json = {"API_KEY" : "secret123" }
688704 ).mock (return_value = Response (200 ))
689705
690- with changing_dir (tmp_path ), patch ("click.getchar" ) as mock_getchar :
706+ with changing_dir (tmp_path ), patch (
707+ "rich_toolkit.container.getchar"
708+ ) as mock_getchar :
691709 mock_getchar .side_effect = steps
692710
693711 result = runner .invoke (app , ["deploy" ])
@@ -731,7 +749,9 @@ def test_rejects_invalid_environment_variable_names(
731749 f"/apps/{ app_data ['id' ]} /environment-variables/" , json = {"VALID_KEY" : "value123" }
732750 ).mock (return_value = Response (200 ))
733751
734- with changing_dir (tmp_path ), patch ("click.getchar" ) as mock_getchar :
752+ with changing_dir (tmp_path ), patch (
753+ "rich_toolkit.container.getchar"
754+ ) as mock_getchar :
735755 mock_getchar .side_effect = steps
736756
737757 result = runner .invoke (app , ["deploy" ])
@@ -754,7 +774,7 @@ def test_shows_error_for_invalid_waitlist_form_data(
754774 ]
755775
756776 with changing_dir (tmp_path ), patch (
757- "rich_toolkit.menu.click .getchar"
777+ "rich_toolkit.container .getchar"
758778 ) as mock_getchar , patch ("rich_toolkit.form.Form.run" ) as mock_form_run :
759779 mock_getchar .side_effect = steps
760780 # Simulate form returning data with invalid email field to trigger ValidationError
@@ -789,7 +809,9 @@ def test_shows_no_apps_found_message_when_team_has_no_apps(
789809 return_value = Response (200 , json = {"data" : []})
790810 )
791811
792- with changing_dir (tmp_path ), patch ("click.getchar" ) as mock_getchar :
812+ with changing_dir (tmp_path ), patch (
813+ "rich_toolkit.container.getchar"
814+ ) as mock_getchar :
793815 mock_getchar .side_effect = steps
794816
795817 result = runner .invoke (app , ["deploy" ])
0 commit comments