From dc85f0c45fff003a815a8eb94ac86c5bd201fd4c Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Fri, 17 Mar 2017 11:14:07 -0700 Subject: [PATCH] assert we log --- certbot/tests/main_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/certbot/tests/main_test.py b/certbot/tests/main_test.py index d92cecd80..7d5f065e2 100644 --- a/certbot/tests/main_test.py +++ b/certbot/tests/main_test.py @@ -1311,8 +1311,10 @@ class TestHandleException(unittest.TestCase): class TestAcquireFileLock(unittest.TestCase): """Test main.acquire_file_lock.""" - def test_bad_path(self): + @mock.patch('certbot.main.logger') + def test_bad_path(self, mock_logger): lock = main.acquire_file_lock(os.getcwd()) + self.assertTrue(mock_logger.warning.called) self.assertFalse(lock.acquired)