mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 23:32:06 -04:00
Add a first test. Remove unused import
This commit is contained in:
parent
3dca99f211
commit
e822f8a4ad
2 changed files with 22 additions and 1 deletions
|
|
@ -8,7 +8,6 @@ import six
|
|||
from acme import challenges
|
||||
|
||||
from certbot import achallenges
|
||||
from certbot.compat import os
|
||||
from certbot.compat import security
|
||||
from certbot.tests import acme_util
|
||||
from certbot.tests import util as test_util
|
||||
|
|
|
|||
22
certbot/tests/compat/security_test.py
Normal file
22
certbot/tests/compat/security_test.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
"""Unit test for security module."""
|
||||
from certbot.compat import os
|
||||
from certbot.compat import security
|
||||
from certbot.tests.util import TempDirTestCase
|
||||
|
||||
|
||||
class SecurityTest(TempDirTestCase):
|
||||
"""Unit tests for security module."""
|
||||
def test_check_modes(self):
|
||||
probe = os.path.join(self.tempdir, 'probe')
|
||||
|
||||
open(probe, 'w').close()
|
||||
|
||||
security.chmod(probe, 0o755)
|
||||
|
||||
# TODO: add assertion when check_mode is implemented
|
||||
#self.assertTrue(security.check_mode(probe, 0o755))
|
||||
|
||||
security.chmod(probe, 0o700)
|
||||
|
||||
# TODO: add assertion when check_mode is implemented
|
||||
#self.assertFalse(security.check_mode(probe, 0o755))
|
||||
Loading…
Reference in a new issue