Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (20 sloc) 0.627 kB
"""
Tests for the package.
"""
import unittest
from mock import Mock
import zippy
class TestZippyAPI(unittest.TestCase):
def setUp(self):
zippy.core.requests = Mock()
zippy.core.loads = Mock()
def test_do_method_calls_requests(self):
req = zippy.do(12345)
self.assertTrue(isinstance(req, Mock))
self.assertTrue(zippy.core.requests.get.called)
def test_da_method_calls_requests(self):
req = zippy.do('12345')
self.assertTrue(isinstance(req, Mock))
self.assertTrue(zippy.core.requests.get.called)
if __name__ == '__main__':
unittest.main()
Jump to Line
Something went wrong with that request. Please try again.