Skip to content

Commit a010246

Browse files
committed
fix(tests): update edit integration tests for multi-file settings behavior
Assertions expected single-file output (filename in stdout, args[1] check); updated to match the new multi-file output format (count label, args list check).
1 parent 22fc171 commit a010246

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/dbx_python_cli/commands/project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,9 @@ def add_project(
300300
with_repos = []
301301

302302
# Determine project directory and name
303+
config = get_config()
303304
use_base_dir_override = False
304305
if directory is None:
305-
config = get_config()
306306
if base_dir is None:
307307
# Use base_dir/projects/name as default when using config
308308
if name is None:

tests/integration/test_project_integration.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -589,14 +589,14 @@ def test_project_edit_with_editor(tmp_path):
589589
result = runner.invoke(app, ["project", "edit", "editproject"])
590590
assert result.exit_code == 0
591591
assert "Opening" in result.stdout
592-
assert "editproject.py" in result.stdout
593-
assert "Settings file saved" in result.stdout
592+
assert "settings file" in result.stdout
593+
assert "Settings files saved" in result.stdout
594594

595595
# Verify subprocess was called with correct arguments
596596
mock_run.assert_called_once()
597597
args = mock_run.call_args[0][0]
598598
assert args[0] == "nano"
599-
assert str(settings_file) in args[1]
599+
assert any(str(settings_file) in a for a in args)
600600

601601

602602
def test_project_edit_with_settings_option(tmp_path):
@@ -693,7 +693,7 @@ def test_project_edit_newest_project(tmp_path):
693693
assert (
694694
"No project specified, using newest: 'newproject'" in result.stdout
695695
)
696-
assert "newproject.py" in result.stdout
696+
assert "settings file" in result.stdout
697697

698698

699699
def test_project_settings_has_installed_apps(tmp_path):

0 commit comments

Comments
 (0)