Procházet zdrojové kódy

Adding tests for New York Times endpoints

David Leonard před 10 roky
rodič
revize
048ea9b6b2
1 změnil soubory, kde provedl 8 přidání a 0 odebrání
  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, '')
+