fix typing

This commit is contained in:
Nick Sweeting
2026-03-15 19:47:36 -07:00
parent 4756697a17
commit 44cabac8d0
7 changed files with 131 additions and 98 deletions

View File

@@ -22,3 +22,18 @@ def test_shell_command_exists(tmp_path, process):
# Should show shell help or recognize command
assert result.returncode in [0, 1, 2]
def test_shell_c_executes_python(tmp_path, process):
"""shell -c should fully initialize Django and run the provided command."""
os.chdir(tmp_path)
result = subprocess.run(
['archivebox', 'shell', '-c', 'print("shell-ok")'],
capture_output=True,
text=True,
timeout=30,
)
assert result.returncode == 0, result.stderr
assert 'shell-ok' in result.stdout