Server IP : 15.235.198.142 / Your IP : 216.73.216.14 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /snap/certbot/current/lib/python3.12/site-packages/certbot/_internal/tests/compat/ |
Upload File : |
"""Unit test for os module.""" import sys import pytest from certbot.compat import os def test_forbidden_methods(): # Checks for os module for method in ['chmod', 'chown', 'open', 'mkdir', 'makedirs', 'rename', 'replace', 'access', 'stat', 'fstat']: with pytest.raises(RuntimeError): getattr(os, method)() # Checks for os.path module for method in ['realpath']: with pytest.raises(RuntimeError): getattr(os.path, method)() if __name__ == "__main__": sys.exit(pytest.main(sys.argv[1:] + [__file__])) # pragma: no cover