From d0a062746829d7072d47b5b00f17fd6bbba16c58 Mon Sep 17 00:00:00 2001 From: vincent Date: Mon, 21 Jun 2021 22:32:43 +0200 Subject: [PATCH] add db session --- tests/assets/filldb.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/assets/filldb.py b/tests/assets/filldb.py index d85eb06..264e41a 100644 --- a/tests/assets/filldb.py +++ b/tests/assets/filldb.py @@ -1,8 +1,10 @@ +from pony.orm import db_session from ITPlanning import db class filldatabase: @staticmethod + @db_session def create_Customer(): return db.Customer( first_name="john", @@ -14,6 +16,7 @@ class filldatabase: ) @staticmethod + @db_session def create_service_category(): return db.Service_category( name="install", @@ -23,6 +26,7 @@ class filldatabase: ) @staticmethod + @db_session def create_service(): service_category = filldatabase.create_service_category() return db.Service( @@ -30,6 +34,7 @@ class filldatabase: ) @staticmethod + @db_session def create_planning(): return db.Planning( name="refresh1", @@ -37,9 +42,11 @@ class filldatabase: ) @staticmethod + @db_session def create_ticket(): pass @staticmethod + @db_session def create_Planner(): pass