def test_get_page_failure(self): client = self._make_client(url, 404, '') self.assertRaises(ValueError, self.loop.run_until_complete, get_page(client, url))
def test_get_page_failure(self): client = self._make_client(url, 404, '') self.assertRaises( ValueError, self.loop.run_until_complete, get_page(client, url))
def test_get_page_success(self): client = self._make_client(url, 200, 'hello world') data = self.loop.run_until_complete(get_page(client, url)) self.assertEqual(data, 'hello world')