Make logging optional for testing purposes
@@ -123,8 +123,9 @@ class TaskStatus:
}
-def create_api():
+def create_api(log=True):
""" Create an instance of the Falcon API server. """
+ if log:
root = logging.getLogger()
root.setLevel(logging.DEBUG)
handler = logging.StreamHandler(sys.stdout)
@@ -144,4 +145,4 @@ def create_api():
return api
-api = create_api()
+_api = create_api()
