def tearDown(self):
     try:
         self.db.close()
     except sqlite3.ProgrammingError:
         pass
     self.db = None
     dispatcher.reset()
 def tearDown(self):
     try:
         self.db.close()
     except sqlite3.ProgrammingError:
         pass
     self.db = None
     dispatcher.reset()
def route_caller(callback, *args, **kwargs):
    dispatcher.selector = callback.route.path
    try:
        results = callback.test(*args, **kwargs)
        if inspect.isgenerator(results):
            return list(results)
        else:
            return results
    finally:
        dispatcher.reset()
def route_caller(callback, *args, **kwargs):
    dispatcher.selector = callback.route.path
    obj = callback()
    try:
        results = obj.run(*args, **kwargs)
        if inspect.isgenerator(results):
            return list(results)
        else:
            return results
    finally:
        obj.db.close()
        dispatcher.reset()
def route_caller(callback, *args, **kwargs):
    dispatcher.selector = callback.route.path
    obj = callback()
    try:
        results = obj.run(*args, **kwargs)
        if inspect.isgenerator(results):
            return list(results)
        else:
            return results
    finally:
        obj.db.close()
        dispatcher.reset()
Пример #6
0
 def tearDown(self):
     dispatcher.reset()
     dispatcher.registered_routes.clear()
     dispatcher.registered_routes.update(self.org_routes)
 def tearDown(self):
     dispatcher.reset()
     dispatcher.registered_routes.clear()
     dispatcher.registered_routes.update(self.org_routes)