def debug_with_user(): with app.app_context(): db.drop_all() db.create_all() create_chartconfigs() from data_visualization.models import User User.generate_fake_user('Fake User', '*****@*****.**', 'fakepassword') app.run(debug=True)
def debug_with_datafactory(): with app.app_context(): db.drop_all() db.create_all() create_chartconfigs() from data_visualization.models import User User.generate_fake_user('Fake User', '*****@*****.**', 'fakepassword') import subprocess datafactory_proc = subprocess.Popen(['python', './datafactory.py']) try: app.run(debug=True) except KeyboardInterrupt: datafactory_proc.kill()
def debug_with_datareplay(): import subprocess subprocess.call([ 'python', './generate_parkingspace_datadefinitions.py', '-c', '20', '-t', '60', '-n', '4', '-x', '8', '-a', '47.475382', '-o', '19.056040', '-r', '0.0025' ]) with app.app_context(): db.drop_all() db.create_all() create_chartconfigs() from data_visualization.models import User User.generate_fake_user('Fake User', '*****@*****.**', 'fakepassword') datareplay_proc = subprocess.Popen(['python', './datareplay.py']) try: app.run(debug=True) except KeyboardInterrupt: datareplay_proc.kill()
def init_db(): with app.app_context(): db.drop_all() db.create_all() create_chartconfigs()
def setUp(self): self.app = create_app('testing') db.drop_all() db.create_all() self.client = self.app.test_client()
def tearDown(self): db.drop_all()