from unittest.mock import patch
import pytest
from myproject.widget import build import json
@pytest.fixture(autouse=True)
def mock_http():
with patch("myproject.widget.requests") as mock:
yield mock
@pytest.fixture(autouse=True)
def mock_run():
with patch("myproject.widget.subprocess") as mock:
yield mock
def describe_build():
def it_builds():
assert build(json) is not None