mirror of
https://github.com/Horizontal42/netsleuth.git
synced 2026-11-10 23:52:04 +03:00
fix: use PurePosixPath in os_timezone symlink test so it doesn't break on Windows
This commit is contained in:
parent
7bcfc3f50d
commit
9fb99b36a2
1 changed files with 2 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import os
|
||||
from pathlib import Path
|
||||
from pathlib import Path, PurePosixPath
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from netsleuth.cli import _dedupe, _os_timezone, parse_target
|
||||
|
|
@ -59,7 +59,7 @@ def test_os_timezone_from_localtime_symlink(mock_path, monkeypatch):
|
|||
monkeypatch.delenv("TZ", raising=False)
|
||||
mock_localtime = MagicMock()
|
||||
mock_localtime.is_symlink.return_value = True
|
||||
mock_localtime.readlink.return_value = Path("/usr/share/zoneinfo/Europe/London")
|
||||
mock_localtime.readlink.return_value = PurePosixPath("/usr/share/zoneinfo/Europe/London")
|
||||
|
||||
def side_effect(path, *args, **kwargs):
|
||||
if str(path) == "/etc/localtime":
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue