@Ghazascanner
_2019runbot
Ghazascanner File Manager
server :Linux phpmyadmin-ubuntu-m-2vcpu-16gb-blr1-01 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Current Path :
/
usr
/
lib
/
python3
/
dist-packages
/
certbot
/
tests
/
compat
/
Path :
Upload File :
New :
File
Dir
//usr/lib/python3/dist-packages/certbot/tests/compat/os_test.py
"""Unit test for os module.""" import unittest from certbot.compat import os class OsTest(unittest.TestCase): """Unit tests for os module.""" def test_forbidden_methods(self): # Checks for os module for method in ['chmod', 'chown', 'open', 'mkdir', 'makedirs', 'rename', 'replace', 'access', 'stat', 'fstat']: self.assertRaises(RuntimeError, getattr(os, method)) # Checks for os.path module for method in ['realpath']: self.assertRaises(RuntimeError, getattr(os.path, method)) if __name__ == "__main__": unittest.main() # pragma: no cover