Mark a role whose title or text says remote while no field does, in prep with no model, and let it meet a gate on remote until extract has read it (migration 35, roles.remote_text)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
f141cffc3c
commit
49929372c7
14 files changed
+144
-36
No files matched your search
@@ -95,7 +95,7 @@ def test_v28_adds_the_cv_columns_and_the_host_deadline_and_runs_twice(tmp_path:
|
||||
|
||||
migrated = Store(path)
|
||||
|
||||
assert migrated.migrations_applied == [28, 29, 30, 31, 32, 33, 34]
|
||||
assert migrated.migrations_applied == [28, 29, 30, 31, 32, 33, 34, 35]
|
||||
rows = {r["source_id"]: r for r in migrated._rows(
|
||||
"SELECT source_id, languages_required, deadline_host, deadline FROM roles")}
|
||||
assert (rows["a"]["deadline_host"], rows["a"]["deadline"]) == ("2026-10-18", None)
|
||||
@@ -106,7 +106,7 @@ def test_v28_adds_the_cv_columns_and_the_host_deadline_and_runs_twice(tmp_path:
|
||||
assert migrated.role(posting("a").uid).deadline == "2026-10-18"
|
||||
with sqlite3.connect(path) as conn:
|
||||
conn.execute("PRAGMA user_version = 27")
|
||||
assert Store(path).migrations_applied == [28, 29, 30, 31, 32, 33, 34]
|
||||
assert Store(path).migrations_applied == [28, 29, 30, 31, 32, 33, 34, 35]
|
||||
|
||||
|
||||
# ---------------------------------------------------------------- deadline
|
||||
@@ -260,7 +260,7 @@ def test_v34_drops_the_must_haves_and_runs_twice(tmp_path: Path) -> None:
|
||||
|
||||
for _ in range(2): # runs twice without harm
|
||||
migrated = Store(path)
|
||||
assert migrated.migrations_applied == [34]
|
||||
assert migrated.migrations_applied == [34, 35]
|
||||
with sqlite3.connect(path) as conn:
|
||||
assert "must_text" not in {r[1] for r in conn.execute("PRAGMA table_info(agents)")}
|
||||
assert not {"musts", "broken"} & {
|
||||
@@ -280,12 +280,12 @@ def test_v30_adds_like_text_and_runs_twice(tmp_path: Path) -> None:
|
||||
|
||||
migrated = Store(path)
|
||||
|
||||
assert migrated.migrations_applied == [30, 31, 32, 33, 34]
|
||||
assert migrated.migrations_applied == [30, 31, 32, 33, 34, 35]
|
||||
[data] = migrated.agents()
|
||||
assert (data.like_text, data.avoid_text) == ("", "Reporting.")
|
||||
with sqlite3.connect(path) as conn:
|
||||
conn.execute("PRAGMA user_version = 29")
|
||||
assert Store(path).migrations_applied == [30, 31, 32, 33, 34]
|
||||
assert Store(path).migrations_applied == [30, 31, 32, 33, 34, 35]
|
||||
|
||||
|
||||
def test_v33_clears_every_judgement_and_lowers_the_old_summarise_default(
|
||||
@@ -313,7 +313,7 @@ def test_v33_clears_every_judgement_and_lowers_the_old_summarise_default(
|
||||
|
||||
for _ in range(2): # runs twice without harm
|
||||
migrated = Store(path)
|
||||
assert migrated.migrations_applied == [33, 34]
|
||||
assert migrated.migrations_applied == [33, 34, 35]
|
||||
assert migrated.judgement(old.id, item.uid) is None
|
||||
with sqlite3.connect(path) as conn:
|
||||
rows = conn.execute(
|
||||
|
||||
Reference in new issue
Block a user