def get(self): self._require_admin() if tba_config.CONFIG["env"] != "prod": TeamTestCreator.createSixTeams() self.redirect("/teams/") else: logging.error("{} tried to create test teams in prod! No can do.".format( self.user_bundle.user.email())) self.redirect("/admin/")
def test_creates(self): self.teams.extend(TeamTestCreator.createSixTeams()) teams = Team.query().order(Team.team_number).fetch(60) self.assertEqual(len(teams), 6)