summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorl-m-h@web.de <l-m-h@web.de>2017-12-07 12:40:51 +0100
committerDavid Bremner <david@tethera.net>2017-12-19 06:42:50 -0400
commit660f1a5a3373f098f6df8912ef6b62fa2b08d8f0 (patch)
tree74fcd20c00b8612b82faac717d9bc769f32ac299
parent3444c731d27fd42bbbdaae00af6ca48b4525b03b (diff)
test: Add test to unset config items with the python bindings
-rwxr-xr-xtest/T390-python.sh13
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