From 2e1c79ed2afc8eaa34d10fe94e57c8b09d6d5c6a Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Wed, 15 May 2019 23:24:38 +0200 Subject: [PATCH] Add test for os module --- certbot/tests/compat/os_test.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 certbot/tests/compat/os_test.py diff --git a/certbot/tests/compat/os_test.py b/certbot/tests/compat/os_test.py new file mode 100644 index 000000000..0a1080cbc --- /dev/null +++ b/certbot/tests/compat/os_test.py @@ -0,0 +1,10 @@ +import unittest + +from certbot.compat import os + + +class OsTest(unittest.TestCase): + """Unit tests for os module.""" + def test_forbidden_methods(self): + for method in ['chmod']: + self.assertRaises(RuntimeError, getattr(os, method))