X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=a1%2F__init__.py;h=818ed1a4e928f04d75bf8ee1e8f1b636dbf9ecbb;hb=aa4ffa78f3e6a9430cc9ae9933165e58105c9d65;hp=62122896438f3503a50a3bcef14d2f7287c19118;hpb=0a3f67614eed2f39b3caaadfeaf6375ecf11172d;p=ric-plt%2Fa1.git diff --git a/a1/__init__.py b/a1/__init__.py index 6212289..818ed1a 100644 --- a/a1/__init__.py +++ b/a1/__init__.py @@ -1,3 +1,6 @@ +""" +contains the app; broken out here for ease of unit testing +""" # ================================================================================== # Copyright (c) 2019 Nokia # Copyright (c) 2018-2019 AT&T Intellectual Property. @@ -14,23 +17,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # ================================================================================== -import logging import connexion -def get_module_logger(mod_name): - """ - To use this, do logger = get_module_logger(__name__) - """ - logger = logging.getLogger(mod_name) - handler = logging.StreamHandler() - formatter = logging.Formatter( - '%(asctime)s [%(name)-12s] %(levelname)-8s %(message)s') - handler.setFormatter(formatter) - logger.addHandler(handler) - logger.setLevel(logging.DEBUG) - return logger - - -app = connexion.App(__name__, specification_dir='.') -app.add_api('openapi.yaml', arguments={'title': 'My Title'}) +app = connexion.App(__name__, specification_dir=".") +app.add_api("openapi.yaml", arguments={"title": "My Title"})