Exemple #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)
Exemple #2
0
 def test_fetch_image_jpeg(self):
     response = potd.fetch(self.thumb_url)
     self.assertEqual(response.headers['content-type'], 'image/jpeg')
Exemple #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)