mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 08:45:22 +02:00
Tests
This commit is contained in:
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
NAME="SystemdOS"
|
||||
VERSION="42.42.42 LTS, Unreal"
|
||||
ID=systemdos
|
||||
ID_LIKE=debian
|
||||
ID_LIKE="something nonexistent debian"
|
||||
VERSION_ID="42"
|
||||
HOME_URL="http://www.example.com/"
|
||||
SUPPORT_URL="http://help.example.com/"
|
||||
|
||||
@@ -359,6 +359,15 @@ class OsInfoTest(unittest.TestCase):
|
||||
with mock.patch('os.path.isfile', return_value=False):
|
||||
self.assertEqual(get_systemd_os_info(), ("", ""))
|
||||
|
||||
def test_systemd_os_release_like(self):
|
||||
from certbot.util import get_systemd_os_like
|
||||
|
||||
with mock.patch('os.path.isfile', return_value=True):
|
||||
id_likes = get_systemd_os_like(test_util.vector_path(
|
||||
"os-release"))
|
||||
self.assertEqual(len(id_likes), 3)
|
||||
self.assertTrue("debian" in id_likes)
|
||||
|
||||
@mock.patch("certbot.util.subprocess.Popen")
|
||||
def test_non_systemd_os_info(self, popen_mock):
|
||||
from certbot.util import (get_os_info, get_python_os_info,
|
||||
|
||||
Reference in New Issue
Block a user