Archived
16 lines
589 B
Python
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
|