This repository has been archived on 2026-11-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
WGTools-Extended/tests/test_extended_update_disabled.py
asminme affe28ad71
Wydanie WGTools-Extended / release (push) Failing after 16s
1.0.0
2026-10-30 00:35:08 +01:00

16 lines
589 B
Python

"""The fork must not contact the upstream update service."""
from pathlib import Path
import runpy
import pytest
def test_upstream_update_is_disabled():
pytest.importorskip('fcntl')
helper = runpy.run_path(str(Path(__file__).resolve().parents[1] / 'scripts/wgtools-helper'))
with pytest.raises(RuntimeError, match='Aktualizacje online są wyłączone'):
helper['update_check']()
with pytest.raises(RuntimeError, match='Aktualizacje online są wyłączone'):
helper['update_apply']('wg0')
assert helper['update_notice']()['update_available'] is False