diff --git a/tfw/components/pipe_io/pipe_connector/test_proxy_pipe_connector.py b/tfw/components/pipe_io/pipe_connector/test_proxy_pipe_connector.py index 12a541a..3961b28 100644 --- a/tfw/components/pipe_io/pipe_connector/test_proxy_pipe_connector.py +++ b/tfw/components/pipe_io/pipe_connector/test_proxy_pipe_connector.py @@ -3,8 +3,9 @@ from enum import Enum from dataclasses import dataclass from json import dumps from secrets import token_urlsafe -from os import urandom, mkfifo, mkdir, mknod +from os import urandom, mkfifo, mkdir from os.path import join +from pathlib import Path from tempfile import TemporaryDirectory from tfw.internals.inotify import InotifyFileCreatedEvent, InotifyFileDeletedEvent @@ -141,13 +142,13 @@ def test_broadcast(mock_context): for path in paths: assert mock_context.pipes.recv_pipes[path].messages[-1] == payload - def test_inode_types(mock_context): + touch = lambda path: Path(path).touch() cases = [ (Action.RECV, mock_context.pipes.recv_pipes, mkdir), (Action.SEND, mock_context.pipes.send_pipes, mkdir), - (Action.RECV, mock_context.pipes.recv_pipes, mknod), - (Action.SEND, mock_context.pipes.send_pipes, mknod) + (Action.RECV, mock_context.pipes.recv_pipes, touch), + (Action.SEND, mock_context.pipes.send_pipes, touch) ] for action, pipes, creator in cases: