예제 #1
0
def app():
    app = create_app(test=True)
    with app.app_context():
        db.create_all()
    yield app
    with app.app_context():
        db.drop_all()
예제 #2
0
# coding:utf-8

from todos import create_app

app = create_app()

if __name__ == '__main__':
    app.run(debug=True)
예제 #3
0
from todos import db, create_app

db.create_all(app=create_app()) 
예제 #4
0
 def create_app(self):
     return create_app()
예제 #5
0
 def create_app(self):
     app = create_app()
     app.config['LIVESERVER_PORT'] = 8943
     return app
예제 #6
0
 def create_app(self):
     app = create_app()
     self.twill = Twill(app)
     return app
예제 #7
0
 def create_app(self):
     app = create_app()
     app.config.from_object(self)
     return app
예제 #8
0
        Generic.Heading: "bold #000080",  # class: 'gh'
        Generic.Inserted: "#00A000",  # class: 'gi'
        Generic.Output: "#888",  # class: 'go'
        Generic.Prompt: "#745334",  # class: 'gp'
        Generic.Strong: "bold #000000",  # class: 'gs'
        Generic.Subheading: "bold #800080",  # class: 'gu'
        Generic.Traceback: "bold #a40000",  # class: 'gt'
    }


########NEW FILE########
__FILENAME__ = run
from todos import create_app

if __name__ == "__main__":
    app = create_app()
    app.run()

########NEW FILE########
__FILENAME__ = tests
from twill.browser import TwillException
from flask_testing import TestCase, Twill

from todos import create_app


class TestViews(TestCase):
    def create_app(self):
        app = create_app()
        self.twill = Twill(app)
        return app
예제 #9
0
 def create_app(self):
     app = create_app()
     self.twill = Twill(app)
     return app
예제 #10
0
 def create_app(self):
     return create_app()
예제 #11
0
 def create_app(self):
     app = create_app()
     app.config.from_object(self)
     return app
예제 #12
0
 def create_app(self):
     app = create_app()
     app.config['LIVESERVER_PORT'] = 8943
     return app