Skip to content

Commit

Permalink
Use patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
heavenshell committed Mar 12, 2015
1 parent 0a99782 commit 0c51434
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ def setUpClass(cls):
cls.client = Client(mackerel_api_key=api_key)
cls.id = 'xxxxxxxxxxx'

def test_should_get_hosts(self):
@patch('mackerel.client.requests.get')
def test_should_get_hosts(self, m):
""" Client().get_hosts() should get host list. """
dummy_response(m, 'fixtures/get_hosts.json')
hosts = self.client.get_hosts()
for host in hosts:
self.assertTrue(isinstance(host, Host))
Expand Down

0 comments on commit 0c51434

Please sign in to comment.