Parcourir la source

Adding test cases for Steam Sale scraper

David Leonard il y a 10 ans
Parent
commit
09bd1e0684
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  1. 8 0
      hackathon_starter/hackathon/tests.py

+ 8 - 0
hackathon_starter/hackathon/tests.py

@@ -93,4 +93,12 @@ class YelpTestCase(TestCase):
 		resp = self.client.get('/hackathon/yelp')
 		self.assertEqual(resp.status_code, 301)
 
+class ScraperTestCase(TestCase):
+	def testScraperPage(self):
+		resp = self.client.get('/hackathon/steamDiscountedGames/')
+		self.assertEqual(resp.status_code, 200)
+
+	def testScraperContent(self):
+		resp = self.client.get('/hackathon/steamDiscountedGames/')
+		self.assertNotEqual(resp.content, '')