def setUp(self): setup_test_app_db() db.create_all() self.client = app.test_client() TmsApp() self.meet = Meet.init_meet(EXAMPLE_MEETS[0])
def setUp(self): setup_test_app_db() db.create_all() self.client = app.test_client() self.boys8 = Division(gender="M", grade="8") self.girls6 = Division(gender="F", grade="6") db.session.add_all([self.boys8, self.girls6]) db.session.commit()
def setUp(self): setup_test_app_db() db.create_all() self.client = app.test_client() TmsApp() self.meet = Meet.init_meet(EXAMPLE_MEETS[0]) self.school = School(name="Hackbright", code="HBRT") db.session.add(self.school) db.session.commit()
def setUp(self): setup_test_app_db() db.create_all() self.client = app.test_client() EventDefinition.generate_event_defs(EVENT_DEFS) self.pv = EventDefinition.query.filter_by(code="PV").one() self.hj = EventDefinition.query.filter_by(code="HJ").one() self.i100 = EventDefinition.query.filter_by(code="100M").one() self.i800 = EventDefinition.query.filter_by(code="800M").one() self.i1600 = EventDefinition.query.filter_by(code="1600M").one() self.sp = EventDefinition.query.filter_by(code="SP").one() self.dt = EventDefinition.query.filter_by(code="DT").one() self.lj = EventDefinition.query.filter_by(code="LJ").one() self.tj = EventDefinition.query.filter_by(code="TJ").one() self.r4x400 = EventDefinition.query.filter_by(code="4x400M").one() self.r4x100 = EventDefinition.query.filter_by(code="4x400M").one()
def setUp(self): info("testVerifyEmptyDatabase - setup") setup_test_app_db() db.create_all() self.client = app.test_client() self.assertEqual(0, Meet.query.count()) self.assertEqual(0, Athlete.query.count()) self.assertEqual(0, Entry.query.count()) self.assertEqual(0, MeetDivisionEvent.query.count()) self.assertEqual(0, School.query.count()) self.assertEqual(0, EventDefinition.query.count()) self.assertEqual(0, EventOrdering.query.count()) self.assertEqual(0, Division.query.count()) self.assertEqual(0, DivOrdering.query.count()) self.assertEqual(0, User.query.count()) TmsApp() self.meet1 = Meet.init_meet(EXAMPLE_MEETS[0])
def setUp(self): setup_test_app_db() db.create_all() self.client = app.test_client() TmsApp() self.meet = Meet.init_meet({ 'name': 'TestEntryMarks Meet', 'date': "August 5, 2018", 'division_order': ['7F'], 'event_order': ['1600M', 'LJ'] }) athlete = Athlete("Sue", "K", "Raisty", "F", "7") db.session.add(athlete) db.session.commit() self.athlete = athlete self.mde_1600m = MeetDivisionEvent.query.filter_by( meet=self.meet, event_code="1600M").one() self.mde_longjump = MeetDivisionEvent.query.filter_by( meet=self.meet, event_code="LJ").one()
def setUp(self): setup_test_app_db() db.create_all() self.client = app.test_client() TmsApp()