letsencrypt: Disable test when sudo is not available

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Federico Ceratto authored and Sunil Mohan Adapa committed 2017-11-03 18:32:14 +05:30
1 parent 8ace9046c3
commit f0c0d6dcf5
1 file changed
+3
@@ -19,13 +19,16 @@ Tests for letsencrypt module.
"""
import os
import os.path
import unittest
from .. import on_domain_added, on_domain_removed
euid = os.geteuid()
sudo_available = os.path.isfile("/usr/bin/sudo")
@unittest.skipUnless(sudo_available, 'Requires sudo')
class TestDomainNameChanges(unittest.TestCase):
"""Test for automatically obtaining and revoking Let's Encrypt certs"""