1234567891011121314151617 |
- # -*- coding: utf-8 -*-
- from q3stats.testing import BaseQ3StatsWebAppTestCase
- class Test_GetFrontendPlayers(BaseQ3StatsWebAppTestCase):
- def test_ok(self):
- with self.app.test_request_context():
- rsp = self.client.get('/players/')
- assert rsp.status_code == 302
- assert rsp.headers['Location'].endswith('/#/players/')
- def test_ok_with_player(self):
- with self.app.test_request_context():
- rsp = self.client.get('/players/tomekwojcik')
- assert rsp.status_code == 302
- assert rsp.headers['Location'].endswith('/#/players/tomekwojcik')
|