예제 #1
0
 def test_get_page_failure(self):
     client = self._make_client(url, 404, '')
     self.assertRaises(ValueError, self.loop.run_until_complete,
                       get_page(client, url))
예제 #2
0
 def test_get_page_failure(self):
     client = self._make_client(url, 404, '')
     self.assertRaises(
         ValueError, self.loop.run_until_complete, get_page(client, url))
예제 #3
0
 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')
예제 #4
0
 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')