예제 #1
0
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)
예제 #2
0
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()
예제 #3
0
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()
예제 #4
0
def init_db():
    with app.app_context():
        db.drop_all()
        db.create_all()
        create_chartconfigs()
예제 #5
0
 def setUp(self):
     self.app = create_app('testing')
     db.drop_all()
     db.create_all()
     self.client = self.app.test_client()