File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
tests/test_cli_operations Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -606,12 +606,16 @@ def test_runserver_command(self, temp_dir: str) -> None:
606606 os .chdir (project_path )
607607
608608 # when
609- with patch ("subprocess.run" ) as mock_run :
609+ with patch ("fastapi_fastkit.cli. subprocess.run" ) as mock_run :
610610 mock_run .return_value .returncode = 0
611611 result = self .runner .invoke (fastkit_cli , ["runserver" ])
612612
613613 # then
614- assert result .exit_code == 0
614+ if result .exit_code != 0 :
615+ print (f"Command output: { result .output } " )
616+ print (f"Exception: { result .exception } " )
617+ assert result .exit_code == 0 , f"runserver failed with output: { result .output } "
618+ assert mock_run .called
615619
616620 def test_runserver_no_venv_project (self , temp_dir : str ) -> None :
617621 # given
You can’t perform that action at this time.
0 commit comments