diff options
| author | l-m-h@web.de <l-m-h@web.de> | 2017-12-07 12:40:51 +0100 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-12-19 06:42:50 -0400 |
| commit | 660f1a5a3373f098f6df8912ef6b62fa2b08d8f0 (patch) | |
| tree | 74fcd20c00b8612b82faac717d9bc769f32ac299 | |
| parent | 3444c731d27fd42bbbdaae00af6ca48b4525b03b (diff) | |
test: Add test to unset config items with the python bindings
| -rwxr-xr-x | test/T390-python.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/T390-python.sh b/test/T390-python.sh index c6f395e4..312d61e8 100755 --- a/test/T390-python.sh +++ b/test/T390-python.sh @@ -142,4 +142,17 @@ cat <<'EOF' >EXPECTED EOF 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 |
