summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--obnamlib/lockmgr_tests.py2
-rw-r--r--obnamlib/obnamerror.py4
-rw-r--r--obnamlib/repo_interface.py3
3 files changed, 4 insertions, 5 deletions
diff --git a/obnamlib/lockmgr_tests.py b/obnamlib/lockmgr_tests.py
index 06bee1a2..c6dd6d39 100644
--- a/obnamlib/lockmgr_tests.py
+++ b/obnamlib/lockmgr_tests.py
@@ -75,7 +75,7 @@ class LockManagerTests(unittest.TestCase):
self.lm._sleep = lambda: os.remove(
self.lm.get_lock_name(self.dirnames[0]))
self.lm.lock([self.dirnames[0]])
- self.assertTrue(True)
+ self.assertTrue(self.lm.is_locked(self.dirnames[0]))
def test_locks_all_directories(self):
self.lm.lock(self.dirnames)
diff --git a/obnamlib/obnamerror.py b/obnamlib/obnamerror.py
index 360ba2a2..d639cb15 100644
--- a/obnamlib/obnamerror.py
+++ b/obnamlib/obnamerror.py
@@ -16,11 +16,11 @@
# =*= License: GPL-3+ =*=
-import structurederror
+from .structurederror import StructuredError
# Base exception for all Obnam specific exceptions.
-class ObnamError(structurederror.StructuredError):
+class ObnamError(StructuredError):
pass
diff --git a/obnamlib/repo_interface.py b/obnamlib/repo_interface.py
index 361c33c9..0077b6df 100644
--- a/obnamlib/repo_interface.py
+++ b/obnamlib/repo_interface.py
@@ -991,8 +991,7 @@ class RepositoryInterfaceTests(unittest.TestCase): # pragma: no cover
def test_closes_repository(self):
# Can't think of a test to verify the closing happened,
# so just calling the method will have to do for now.
- self.repo.close()
- self.assertTrue(True)
+ self.assertEqual(self.repo.close(), None)
def test_returns_list_of_shared_directories(self):
self.assertTrue(type(self.repo.get_shared_directories()), list)