From 92aa5d8670733ded72b03218fcca96a6337f32f6 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Fri, 17 Mar 2017 11:12:12 -0700 Subject: [PATCH] Add TestAcquireFileLock --- certbot/tests/main_test.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/certbot/tests/main_test.py b/certbot/tests/main_test.py index 170eceb48..d92cecd80 100644 --- a/certbot/tests/main_test.py +++ b/certbot/tests/main_test.py @@ -1308,5 +1308,13 @@ class TestHandleException(unittest.TestCase): traceback.format_exception_only(KeyboardInterrupt, interrupt))) +class TestAcquireFileLock(unittest.TestCase): + """Test main.acquire_file_lock.""" + + def test_bad_path(self): + lock = main.acquire_file_lock(os.getcwd()) + self.assertFalse(lock.acquired) + + if __name__ == '__main__': unittest.main() # pragma: no cover