예제 #1
0
def runserver():
    """
    Invoke Flask development server.

    """
    graph = create_app(debug=True)
    runserver_main(graph)
예제 #2
0
def createall():
    """
    Create (and possibly drop) database tables.

    """
    graph = create_app(debug=True, model_only=True)
    createall_main(graph)
예제 #3
0
def migrate():
    """
    Invoke Alembic migrations.

    """
    graph = create_app(debug=True, model_only=True)
    migrate_main(graph)
예제 #4
0
    def setup(self):
        self.graph = create_app(testing=True)
        self.client = self.graph.flask.test_client()
        recreate_all(self.graph)

        with SessionContext(self.graph), transaction():
            self.new_order = Order().create()

            self.new_pizza = Pizza(
                id=new_object_id(),
                order_id=self.new_order.id,
                pizza_size=PizzaSize.SMALL.name,
                pizza_type=PizzaType.HANDTOSSED.name,
            ).create()

        self.first_topping = Topping(
            id=new_object_id(),
            pizza_id=self.new_pizza.id,
            topping_type=ToppingType.ONIONS,
        )

        self.second_topping = Topping(
            id=new_object_id(),
            pizza_id=self.new_pizza.id,
            topping_type=ToppingType.CHICKEN,
        )
예제 #5
0
    def setup(self):
        self.graph = create_app(testing=True)
        self.client = self.graph.flask.test_client()
        recreate_all(self.graph)
        with SessionContext(self.graph), transaction():
            self.new_order = Order().create()

        self.customer_event = CustomerStartedOrder(id=new_object_id(),
                                                   order_id=self.new_order.id)
    def setup(self):
        self.graph = create_app(testing=True)
        self.customer_event_store = self.graph.customer_event_store
        self.pizza_store = self.graph.pizza_store
        self.order_store = self.graph.order_store
        self.topping_store = self.graph.topping_store

        self.context = SessionContext(self.graph)
        self.context.recreate_all()
        self.context.open()
예제 #7
0
    def setup(self):
        self.graph = create_app(testing=True)
        self.pizza_store = self.graph.pizza_store
        self.order_store = self.graph.order_store

        self.pizza_type = PizzaType.HANDTOSSED.name
        self.pizza_size = PizzaSize.SMALL.name

        self.context = SessionContext(self.graph)
        self.context.recreate_all()
        self.context.open()
예제 #8
0
    def setup(self):
        self.graph = create_app(testing=True)
        self.topping_store = self.graph.topping_store
        self.pizza_store = self.graph.pizza_store

        self.pizza_type = PizzaType.HANDTOSSED.name
        self.pizza_size = PizzaSize.SMALL.name

        self.context = SessionContext(self.graph)
        self.context.recreate_all()
        self.context.open()

        self.new_order = Order().create()

        self.new_pizza = Pizza(
            order_id=self.new_order.id,
            pizza_size=self.pizza_size,
            pizza_type=self.pizza_type,
        ).create()
예제 #9
0
"""
Entrypoint module for WSGI containers.

"""
from peetza.app import create_app

app = create_app().app
예제 #10
0
    def setup(self):
        self.graph = create_app(testing=True)
        self.client = self.graph.flask.test_client()
        recreate_all(self.graph)

        self.new_order = Order(id=new_object_id(), )