From bfaa23c896df72b8b34ad70c723d05a206a56c19 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 11 Jun 2017 18:27:14 +0300 Subject: Fix: Make "obnam forget" for GA delete unused chunks --- obnamlib/fmt_ga/leaf_tests.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'obnamlib/fmt_ga/leaf_tests.py') diff --git a/obnamlib/fmt_ga/leaf_tests.py b/obnamlib/fmt_ga/leaf_tests.py index 6c5f2903..30324dd2 100644 --- a/obnamlib/fmt_ga/leaf_tests.py +++ b/obnamlib/fmt_ga/leaf_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 @@ -52,6 +52,12 @@ class CowLeafTests(unittest.TestCase): leaf.insert('foo', 'bar') self.assertEqual(leaf.keys(), ['foo']) + def test_removes_key(self): + leaf = obnamlib.CowLeaf() + leaf.insert('foo', 'bar') + leaf.remove('foo') + self.assertEqual(leaf.keys(), []) + def test_dict_round_trip(self): leaf = obnamlib.CowLeaf() leaf.insert('foo', 'bar') -- cgit v1.2.1