Parcourir la source

Added more integration tests for steam endpoint data

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

+ 8 - 1
hackathon_starter/hackathon/tests.py

@@ -30,7 +30,14 @@ class HackathonViewsTestCase(TestCase):
 	def testSteamImg(self):
 		resp = self.client.get('/hackathon/steam/')
 		for dict in resp.context:
-			self.assertTrue('name' in dict)
+			if 'img_logo_url' in dict:
+				self.assertTrue('img_logo_url' in dict)
+
+	def testSteamAppID(self):
+		resp = self.client.get('/hackathon/steam/')
+		for dict in resp.context:
+			if 'appid' in dict:
+				self.assertTrue('appid' in dict)
 
 
 	def testQuandlDowJones(self):