Your IP : 216.73.216.52


Current Path : /snap/certbot/current/lib64/python3.12/site-packages/certbot/_internal/tests/
Upload File :
Current File : //snap/certbot/current/lib64/python3.12/site-packages/certbot/_internal/tests/conftest.py

from unittest import mock

import pytest

# This avoids a bug on mac where getfqdn errors after a long timeout.
# See https://bugs.python.org/issue35164
# and discussion at https://github.com/certbot/certbot/pull/10408
@pytest.fixture(autouse=True)
def mock_getfqdn():
    with mock.patch("socket.getfqdn", return_value="server_name") as mocked:
        yield mocked

@pytest.fixture(autouse=True)
def mock_sleep():
    with mock.patch("time.sleep") as mocked:
        yield mocked