mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-29 06:04:11 +01:00
test: Add test to unset config items with the python bindings
This commit is contained in:
parent
3444c731d2
commit
660f1a5a33
1 changed files with 13 additions and 0 deletions
|
@ -142,4 +142,17 @@ cat <<'EOF' >EXPECTED
|
||||||
EOF
|
EOF
|
||||||
test_expect_equal_file EXPECTED OUTPUT
|
test_expect_equal_file EXPECTED OUTPUT
|
||||||
|
|
||||||
|
test_begin_subtest "set_config with no value will unset config entries"
|
||||||
|
test_python <<'EOF'
|
||||||
|
import notmuch
|
||||||
|
db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE)
|
||||||
|
db.set_config('testkey1', '')
|
||||||
|
db.set_config('testkey2', '')
|
||||||
|
db.set_config("zzzafter", '')
|
||||||
|
db.set_config("aaabefore", '')
|
||||||
|
v = db.get_configs()
|
||||||
|
print(list(v) == [])
|
||||||
|
EOF
|
||||||
|
test_expect_equal "$(cat OUTPUT)" "True"
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|
Loading…
Reference in a new issue