tests.py 459 B

12345678910111213141516
  1. from django.test import TestCase
  2. # Create your tests here.
  3. class HackathonViewsTestCase(TestCase):
  4. def testIndex(self):
  5. resp = self.client.get('/hackathon/api/')
  6. self.assertEqual(resp.status_code, 200)
  7. def testSteam(self):
  8. resp = self.client.get('/hackathon/steam')
  9. self.assertEqual(resp.status_code, 301)
  10. def testSteamDiscountedGames(self):
  11. resp = self.client.get('/hackathon/steamDiscountedGames/')
  12. self.assertEqual(resp.status_code, 200)