summaryrefslogtreecommitdiff
path: root/obnamlib/fmt_ga/leaf_store_tests.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-06-11 18:27:14 +0300
committerLars Wirzenius <liw@liw.fi>2017-06-13 19:39:33 +0300
commitbfaa23c896df72b8b34ad70c723d05a206a56c19 (patch)
treef32cd3cebbc6190efa8507b444b2d0629baf1187 /obnamlib/fmt_ga/leaf_store_tests.py
parent761c367c9d2a101fc92b225cc234f1da5d28f4bf (diff)
downloadobnam-bfaa23c896df72b8b34ad70c723d05a206a56c19.tar.gz
Fix: Make "obnam forget" for GA delete unused chunks
Diffstat (limited to 'obnamlib/fmt_ga/leaf_store_tests.py')
-rw-r--r--obnamlib/fmt_ga/leaf_store_tests.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/obnamlib/fmt_ga/leaf_store_tests.py b/obnamlib/fmt_ga/leaf_store_tests.py
index 9d1a8f71..049d03e4 100644
--- a/obnamlib/fmt_ga/leaf_store_tests.py
+++ b/obnamlib/fmt_ga/leaf_store_tests.py
@@ -1,4 +1,4 @@
-# Copyright 2016 Lars Wirzenius
+# Copyright 2016-2017 Lars Wirzenius
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -40,6 +40,12 @@ class LeafStoreTests(object):
def test_returns_None_if_leaf_is_missing(self):
self.assertEqual(self.ls.get_leaf(42), None)
+ def test_removes_leaf(self):
+ leaf = {'foo': 'bar'}
+ leaf_id = self.ls.put_leaf(leaf)
+ self.ls.remove_leaf(leaf_id)
+ self.assertEqual(self.ls.get_leaf(leaf_id), None)
+
def test_has_flush(self):
self.assertEqual(self.ls.flush(), None)