!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16. PHP/5.4.16 

uname -a: Linux roko-bkp 3.10.0-1160.102.1.el7.x86_64 #1 SMP Tue Oct 17 15:42:21 UTC 2023 x86_64 

uid=48(apache) gid=48(apache) groups=48(apache),1003(webmaster) 

Safe-mode: OFF (not secure)

/var/lib/snapd/snap/certbot/4892/lib/python3.12/site-packages/certbot_apache/_internal/tests/   drwxr-xr-x
Free 0 B of 55 MB (0%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     entrypoint_test.py (1.68 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
"""Test for certbot_apache._internal.entrypoint for override class resolution"""
import sys
from unittest import mock

import pytest

from certbot_apache._internal import configurator
from certbot_apache._internal import entrypoint


def test_get_configurator():
    with mock.patch("certbot.util.get_os_info") as mock_info:
        for distro in entrypoint.OVERRIDE_CLASSES:
            return_value = (distro, "whatever")
            if distro == 'fedora_old':
                return_value = ('fedora', '28')
            elif distro == 'fedora':
                return_value = ('fedora', '29')
            mock_info.return_value = return_value
            assert entrypoint.get_configurator() == \
                             entrypoint.OVERRIDE_CLASSES[distro]

def test_nonexistent_like():
    with mock.patch("certbot.util.get_os_info") as mock_info:
        mock_info.return_value = ("nonexistent", "irrelevant")
        with mock.patch("certbot.util.get_systemd_os_like") as mock_like:
            for like in entrypoint.OVERRIDE_CLASSES:
                mock_like.return_value = [like]
                assert entrypoint.get_configurator() == \
                                 entrypoint.OVERRIDE_CLASSES[like]

def test_nonexistent_generic():
    with mock.patch("certbot.util.get_os_info") as mock_info:
        mock_info.return_value = ("nonexistent", "irrelevant")
        with mock.patch("certbot.util.get_systemd_os_like") as mock_like:
            mock_like.return_value = ["unknown"]
            assert entrypoint.get_configurator() == \
                             configurator.ApacheConfigurator


if __name__ == "__main__":
    sys.exit(pytest.main(sys.argv[1:] + [__file__]))  # pragma: no cover

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0038 ]--