def __init__(self, year_levels=None, student_count=60, attending_count=50, recipient_count=80): self.student_count = student_count self.attending_count = attending_count self.recipient_count = recipient_count self.student_ids = [] self._alphabet = [c for c in 'abcdefghijklmnopqrstuvwxyz'] self._app = create_app() self._app.app_context().push() self.year_levels = year_levels if year_levels is None: self.year_levels = self._app.config['YEAR_LEVELS'] self.award_count = 0
from awards import db, models, create_app if __name__ == '__main__': if input( 'Are you sure you want to nuke all the tables in the database from space? (y/N) ' ) == 'y': app = create_app() app.app_context().push() models.Student.query.delete() models.Awards.query.delete() models.AwardRecipients.query.delete() db.session.commit() print('Done!') else: print('Canceled!')
def setUp(self): self.app = create_app() self.client = self.app.test_client() self.md = MockDB() self.md.setUp()
def setUp(self): self.app = create_app() self.md = MockDB() self.md.setUp() self.sm = utils.StudentManager()
def setUp(self): self.app = create_app() self.md = MockDB() self.md.setUp()