Last active
March 23, 2019 23:27
-
-
Save rishabh-ink/addebde6856af83f9adc6cf8a29ac80a 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
from unittest import mock | |
import pytest | |
@pytest.mark.parametrize( | |
'ordinary_object', | |
[ | |
'quill', | |
'cushion', | |
'cauldron', | |
], | |
) | |
def test_levitate_casts_a_spell(ordinary_object): | |
with mock.patch( | |
'levitation.cast_spell', | |
autospec=True, | |
) as patched_cast_spell: | |
levitate(ordinary_object) | |
patched_cast_spell.assert_called_once_with(target=ordinary_object) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment