[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
82f637791d
commit
9df8bedda2
2 changed files with 6 additions and 4 deletions
|
|
@ -5343,9 +5343,9 @@ def test_map_entry_fill_reads_and_writes_in_one_transaction(tmp_path, monkeypatc
|
|||
"a": {"v": 1}
|
||||
}
|
||||
assert db.get_app_setting(key) == {"a": {"v": 1}}
|
||||
assert db.upsert_app_setting_map_entry(
|
||||
key, "a", {"v": 2, "w": 7}, fill_absent_fields = True
|
||||
) == {"a": {"v": 1, "w": 7}}
|
||||
assert db.upsert_app_setting_map_entry(key, "a", {"v": 2, "w": 7}, fill_absent_fields = True) == {
|
||||
"a": {"v": 1, "w": 7}
|
||||
}
|
||||
assert db.get_app_setting(key) == {"a": {"v": 1, "w": 7}}
|
||||
# Absent: created.
|
||||
assert db.upsert_app_setting_map_entry(key, "b", {"v": 3}, fill_absent_fields = True) == {
|
||||
|
|
|
|||
|
|
@ -969,7 +969,9 @@ def test_the_backfill_fills_in_fields_rather_than_skipping_known_keys():
|
|||
assert "{ fillAbsentFields: true }," in backfill
|
||||
# Key presence alone is not "done": what the server lacks decides.
|
||||
assert "const stored = known.get(key);" in backfill
|
||||
assert "if (stored && absentFields(stored, current.config).length === 0) { continue; }" in backfill
|
||||
assert (
|
||||
"if (stored && absentFields(stored, current.config).length === 0) { continue; }" in backfill
|
||||
)
|
||||
assert "const fields = Object.keys(toApiOverride(config));" in backfill
|
||||
assert "return fields.filter((field) => !(field in stored));" in backfill
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue