Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import mock
- class Test(ApiTestCase):
- @mock.patch.object(send_sms, 'delay'):
- def test_send_sms(self, send_sms_mock):
- data = {}
- resp = self.client.post(self.url, data, format='json')
- assert send_sms_mock.call_count == 1
Add Comment
Please, Sign In to add comment