summaryrefslogtreecommitdiffstats
path: root/tests/conftest.py
blob: 82c635a105a95fde4bc5ebf357230c1ad4f789ce (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import socket
from unittest import mock

import pytest

from lirc import Client, LircdConnection


@pytest.fixture
def mock_socket():
    return mock.MagicMock(spec=socket.socket)


@pytest.fixture
def mock_connection(mock_socket):
    return LircdConnection(socket=mock_socket)


@pytest.fixture
def mock_client(mock_connection):
    return Client(connection=mock_connection)