def runserver(): """ Invoke Flask development server. """ graph = create_app(debug=True) runserver_main(graph)
def createall(): """ Create (and possibly drop) database tables. """ graph = create_app(debug=True, model_only=True) createall_main(graph)
def migrate(): """ Invoke Alembic migrations. """ graph = create_app(debug=True, model_only=True) migrate_main(graph)
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, )
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()
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()
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()
""" Entrypoint module for WSGI containers. """ from peetza.app import create_app app = create_app().app
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(), )