Created
January 4, 2021 21:24
-
-
Save klement97/cc98f62221421a01a94d100f61c597fe to your computer and use it in GitHub Desktop.
This file contains 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
@pytest.mark.django_db | |
def test_order_save(monkeypatch): | |
def mock_post(*args, **kwargs): | |
return MockResponse() | |
monkeypatch.setattr(requests, 'post', mock_post) | |
order = create_order() | |
assert order.price is not None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment