示例#1
0
 def test_fetch_status_code_not_found(self):
     date = '2100-01-01'
     url = potd.build_page_url(date)
     response = potd.fetch(url)
     self.assertEqual(response.status_code, 404)
示例#2
0
 def test_fetch_image_jpeg(self):
     response = potd.fetch(self.thumb_url)
     self.assertEqual(response.headers['content-type'], 'image/jpeg')
示例#3
0
 def test_fetch_status_code(self):
     date = '2014-05-02'
     url = potd.build_page_url(date)
     response = potd.fetch(url)
     self.assertEqual(response.status_code, 200)