more fixes

This commit is contained in:
Nick Sweeting
2025-12-29 21:03:05 -08:00
parent 147d567d3f
commit 80f75126c6
12 changed files with 339 additions and 135 deletions

View File

@@ -219,8 +219,8 @@ def test_init_quick_flag_skips_checks(tmp_path):
assert db_path.exists()
def test_init_creates_machine_record(tmp_path):
"""Test that init creates a Machine record in machine_machine table."""
def test_init_creates_machine_table(tmp_path):
"""Test that init creates the machine_machine table."""
os.chdir(tmp_path)
subprocess.run(['archivebox', 'init'], capture_output=True)
@@ -231,14 +231,10 @@ def test_init_creates_machine_record(tmp_path):
tables = c.execute(
"SELECT name FROM sqlite_master WHERE type='table' AND name='machine_machine'"
).fetchall()
assert len(tables) == 1
# Check that a machine record was created
machine_count = c.execute("SELECT COUNT(*) FROM machine_machine").fetchone()[0]
assert machine_count >= 1
conn.close()
assert len(tables) == 1
def test_init_output_shows_collection_info(tmp_path):
"""Test that init output shows helpful collection information."""