This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
API_URL = "https://example.com" # often imported from settings | |
# | |
# Code | |
# | |
def get_user_with_org(id: str): | |
"""Gets a User object with the User's Organisation""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
from unittest.mock import MagicMock | |
@pytest.fixture() | |
def patch_user_service(): | |
""" | |
reusable patcher, | |
handy when there are lots of test cases | |
""" | |
user_connector = MagicMock() |
OlderNewer