Add conftest.py

This commit is contained in:
Shreya 2021-02-18 19:41:29 +05:30
parent 42b7fa05d6
commit 7960529ee9
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
import pytest
from infection_monkey.control import ControlClient
@pytest.fixture
def spy_send_telemetry(monkeypatch):
def _spy_send_telemetry(telem_category, data):
_spy_send_telemetry.telem_category = telem_category
_spy_send_telemetry.data = data
_spy_send_telemetry.telem_category = None
_spy_send_telemetry.data = None
monkeypatch.setattr(ControlClient, 'send_telemetry', _spy_send_telemetry)
return _spy_send_telemetry