Explorar o código

Adding test cases for Steam Sale scraper

David Leonard %!s(int64=10) %!d(string=hai) anos
pai
achega
09bd1e0684
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  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, '')