test_get_frontend_players.py 624 B

1234567891011121314151617
  1. # -*- coding: utf-8 -*-
  2. from q3stats.testing import BaseQ3StatsWebAppTestCase
  3. class Test_GetFrontendPlayers(BaseQ3StatsWebAppTestCase):
  4. def test_ok(self):
  5. with self.app.test_request_context():
  6. rsp = self.client.get('/players/')
  7. assert rsp.status_code == 302
  8. assert rsp.headers['Location'].endswith('/#/players/')
  9. def test_ok_with_player(self):
  10. with self.app.test_request_context():
  11. rsp = self.client.get('/players/tomekwojcik')
  12. assert rsp.status_code == 302
  13. assert rsp.headers['Location'].endswith('/#/players/tomekwojcik')