Prechádzať zdrojové kódy

Adding tests for New York Times endpoints

David Leonard 10 rokov pred
rodič
commit
048ea9b6b2
1 zmenil súbory, kde vykonal 8 pridanie a 0 odobranie
  1. 8 0
      hackathon_starter/hackathon/tests.py

+ 8 - 0
hackathon_starter/hackathon/tests.py

@@ -124,4 +124,12 @@ class NewYorkTimesTestCase(TestCase):
 		resp = self.client.get('/hackathon/nytimestop/')
 		self.assertNotEqual(resp.content, '')
 
+	def testNewYorkTimesArticles(self):
+		resp = self.client.get('/hackathon/nytimesarticles/')
+		self.assertEqual(resp.status_code, 200)
+
+	def testNewYorkTimesArticlesContent(self):
+		resp = self.client.get('/hackathon/nytimesarticles/')
+		self.assertEqualNotEqual(resp.content, '')
+