Exemplo n.º 1
0
def runserver():
    """
    Invoke Flask development server.

    """
    graph = create_app(debug=True)
    runserver_main(graph)
Exemplo n.º 2
0
def migrate():
    """
    Invoke Alembic migrations.

    """
    graph = create_app(debug=True, model_only=True)
    migrate_main(graph)
Exemplo n.º 3
0
def createall():
    """
    Create (and possibly drop) database tables.

    """
    graph = create_app(debug=True, model_only=True)
    createall_main(graph)
Exemplo n.º 4
0
    def setup(self):
        self.graph = create_app(testing=True)
        self.client = self.graph.flask.test_client()
        recreate_all(self.graph)

        self.order_id = new_object_id()
        self.order1 = Order(id=self.order_id, customer_id=new_object_id())
        self.detail_uri = f"/api/v1/order/{self.order1.id}"
Exemplo n.º 5
0
    def setup(self):
        self.graph = create_app(testing=True)
        self.pizza_store = self.graph.pizza_store

        self.name = "NAME"

        self.context = SessionContext(self.graph)
        self.context.recreate_all()
        self.context.open()
Exemplo n.º 6
0
    def setup(self):
        self.graph = create_app(testing=True)
        self.order_event_store = self.graph.order_event_store

        self.order_id = new_object_id()

        self.context = SessionContext(self.graph)
        self.context.recreate_all()
        self.context.open()
Exemplo n.º 7
0
    def setup(self):
        self.graph = create_app(testing=True)
        self.client = self.graph.flask.test_client()
        recreate_all(self.graph)

        self.order_event_id = new_object_id()
        self.order = Order(id=new_object_id())
        self.order_event = OrderEvent(
            id=self.order_event_id,
            order_id=self.order.id,
            event_type="OrderInitialized",
        )
        self.detail_uri = f"{self.list_uri}/{self.order_event_id}"
Exemplo n.º 8
0
    def setup(self):
        self.graph = create_app(testing=True)
        self.client = self.graph.flask.test_client()
        recreate_all(self.graph)

        self.name1 = "name1"
        self.order_id = new_object_id()
        self.customer_id = new_object_id()
        self.order = Order(id=self.order_id, customer_id=self.customer_id)
        self.pizza1 = Pizza(
            id=new_object_id(),
            customer_id=self.customer_id,
            crust_type="thin",
            size=12,
            order_id=self.order_id,
        )
Exemplo n.º 9
0
    def setup(self):
        self.graph = create_app(testing=True)
        self.client = self.graph.flask.test_client()
        recreate_all(self.graph)

        self.factory = self.graph.order_event_factory

        self.pizza_id = new_object_id()
        self.order_id = new_object_id()
        self.customer_id = new_object_id()
        self.topping_id = new_object_id()
        self.pizza = Pizza(id=self.pizza_id, customer_id=self.customer_id)
        self.order = Order(id=self.order_id, customer_id=self.customer_id)
        self.topping1 = Topping(
            id=self.topping_id,
            pizza_id=self.pizza_id,
            topping_type="ONION",
            order_id=self.order_id,
        )
        self.detail_uri = f"/api/v1/topping/{self.topping1.id}"
Exemplo n.º 10
0
"""
Entrypoint module for WSGI containers.

"""
from rob_onboarding.app import create_app

app = create_app().app