Browse Source

Working on integration test for steam discounts endpoint

David Leonard 10 năm trước cách đây
mục cha
commit
5299506dec

+ 4 - 3
hackathon_starter/hackathon/tests.py

@@ -1,8 +1,5 @@
 from django.test import TestCase
 
-# Create your tests here.
-
-
 class SteamViewTestCase(TestCase):
 	def testSteam(self):
 		resp = self.client.get('/hackathon/steam/')
@@ -36,6 +33,10 @@ class SteamViewTestCase(TestCase):
 			if 'appid' in dict:
 				self.assertTrue('appid' in dict)
 
+	def testSteamDiscountedGamesDiscount(self):
+		resp = self.client.get('/hackathon/steamDiscountedGames/')
+		self.assertEqual(resp.context, None)
+
 
 class HackathonViewsTestCase(TestCase):
 	def testIndex(self):

+ 0 - 3
hackathon_starter/hackathon/views.py

@@ -63,9 +63,6 @@ def steam(request):
     SteamUN = "Marorin"
     steamID = steamidpulling(SteamUN, key)
     game = gamespulling(steamID, key)
-    for thing in game:
-        if 'playtime_forever' in thing:
-            print 'yeah'
     return render(request,'hackathon/steam.html', {"game": game })
 
 def steamDiscountedGames(request):