瀏覽代碼

Adding test cases for Steam Sale scraper

David Leonard 10 年之前
父節點
當前提交
09bd1e0684
共有 1 個文件被更改,包括 8 次插入0 次删除
  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, '')