def register(): """ POST to apply for entry to a tournament. """ exists = g.tournament.details() # pylint: disable=unused-variable rego = TournamentRegistration(g.username, g.tournament_id) rego.add_to_db() g.tournament.confirm_entries() g.tournament.make_draws() return 'Application Submitted'
def test_non_finalised_only_actions(self): self.tournament.set_in_progress() args = score_cat_args('disallowed_cat', 100, True, 1, 1) self.assertRaises(ValueError, self.tournament.update, {'score_categories': [args]}) self.assertRaises(ValueError, self.tournament.update, {'rounds': 5}) rego = Reg(self.player_1, self.name) rego.add_to_db() self.assertRaises(ValueError, self.tournament.confirm_entries)