Ejemplo n.º 1
0
 def get(self):
     datefmt = ISO8601DateTime()
     return dict(
         teams=app.config.get('TEAMS', False),
         sbname=app.config.get('TITLE', 'Scoreboard'),
         news_mechanism='poll',
         news_poll_interval=app.config.get('NEWS_POLL_INTERVAL', 60000),
         csrf_token=csrfutil.get_csrf_token(),
         rules=app.config.get('RULES', '/rules'),
         game_start=datefmt.format(utils.GameTime.start),
         game_end=datefmt.format(utils.GameTime.end),
         )
Ejemplo n.º 2
0
 def get(self):
     datefmt = ISO8601DateTime()
     return dict(
         teams=app.config.get('TEAMS', False),
         sbname=app.config.get('TITLE', 'Scoreboard'),
         news_mechanism='poll',
         news_poll_interval=app.config.get('NEWS_POLL_INTERVAL', 60000),
         csrf_token=csrfutil.get_csrf_token(),
         rules=app.config.get('RULES', '/rules'),
         game_start=datefmt.format(utils.GameTime.start),
         game_end=datefmt.format(utils.GameTime.end),
         )
Ejemplo n.º 3
0
 def get(self):
     datefmt = ISO8601DateTime()
     return dict(
         teams=app.config.get('TEAMS'),
         sbname=app.config.get('TITLE'),
         news_mechanism='poll',
         news_poll_interval=app.config.get('NEWS_POLL_INTERVAL'),
         csrf_token=csrfutil.get_csrf_token(),
         rules=app.config.get('RULES'),
         game_start=datefmt.format(utils.GameTime.start),
         game_end=datefmt.format(utils.GameTime.end),
         login_url=auth.get_login_uri(),
         register_url=auth.get_register_uri(),
         login_method=app.config.get('LOGIN_METHOD'),
         scoring=app.config.get('SCORING'),
         )
Ejemplo n.º 4
0
 def get(self):
     datefmt = ISO8601DateTime()
     return dict(
         teams=app.config.get('TEAMS'),
         sbname=app.config.get('TITLE'),
         news_mechanism='poll',
         news_poll_interval=app.config.get('NEWS_POLL_INTERVAL'),
         csrf_token=csrfutil.get_csrf_token(),
         rules=app.config.get('RULES'),
         game_start=datefmt.format(utils.GameTime.start),
         game_end=datefmt.format(utils.GameTime.end),
         login_url=auth.get_login_uri(),
         register_url=auth.get_register_uri(),
         login_method=app.config.get('LOGIN_METHOD'),
         scoring=app.config.get('SCORING'),
         )
Ejemplo n.º 5
0
 def get(self):
     datefmt = ISO8601DateTime()
     config = dict(
         teams=app.config.get('TEAMS'),
         sbname=app.config.get('TITLE'),
         news_mechanism='poll',
         news_poll_interval=app.config.get('NEWS_POLL_INTERVAL'),
         csrf_token=csrfutil.get_csrf_token(),
         rules=app.config.get('RULES'),
         game_start=datefmt.format(utils.GameTime.start),
         game_end=datefmt.format(utils.GameTime.end),
         login_url=auth.get_login_uri(),
         register_url=auth.get_register_uri(),
         login_method=app.config.get('LOGIN_METHOD'),
         scoring=app.config.get('SCORING'),
         validators=validators.ValidatorMeta(),
         proof_of_work_bits=int(app.config.get('PROOF_OF_WORK_BITS')),
         invite_only=app.config.get('INVITE_KEY') is not None,
     )
     return config
Ejemplo n.º 6
0
 def get(self):
     datefmt = ISO8601DateTime()
     config = dict(
         teams=app.config.get('TEAMS'),
         sbname=app.config.get('TITLE'),
         news_mechanism='poll',
         news_poll_interval=app.config.get('NEWS_POLL_INTERVAL'),
         csrf_token=csrfutil.get_csrf_token(),
         rules=app.config.get('RULES'),
         game_start=datefmt.format(utils.GameTime.start),
         game_end=datefmt.format(utils.GameTime.end),
         login_url=auth.get_login_uri(),
         register_url=auth.get_register_uri(),
         login_method=app.config.get('LOGIN_METHOD'),
         scoring=app.config.get('SCORING'),
         validators=validators.ValidatorMeta(),
         proof_of_work_bits=int(app.config.get('PROOF_OF_WORK_BITS')),
         invite_only=app.config.get('INVITE_KEY') is not None,
         )
     return config
Ejemplo n.º 7
0
 def testGetCSRFToken(self, mock_time):
     mock_time.return_value = self.base_clock
     self.assertEqual(self.valid_token,
                      csrfutil.get_csrf_token(self.test_user))
     mock_time.assert_called_once_with()
Ejemplo n.º 8
0
 def testGetCSRFToken(self, mock_time):
     mock_time.return_value = self.base_clock
     self.assertEqual(self.valid_token,
                      csrfutil.get_csrf_token(self.test_user))
     mock_time.assert_called_once_with()