def test_no_duplicated(self): db_manage = DataManager() folder_path = os.path.dirname(os.path.abspath(__file__)) db_manage.load_data(folder_path) stores = db.session.query(Store).all() self.assertEquals(len(stores), 6)
def setUp(self): db.create_all() self.app = app.test_client() self.app_context = app.app_context() self.app_context.push() db_manage = DataManager() folder_path = os.path.dirname(os.path.abspath(__file__)) db_manage.load_data(folder_path)
def load_data(): db_manage = DataManager() folder_path = os.path.dirname(os.path.abspath(__file__)) db_manage.load_data(folder_path) return "data loaded"