update link to upper-constraints.txt
[optf/osdf.git] / test / logging / test_osdf_logging.py
index 982ef0b..c8fa3ae 100755 (executable)
 # -------------------------------------------------------------------------
 #
 import unittest
-import json
-import yaml
+from unittest import mock
 
 from osdf.logging import osdf_logging as L1
-from osdf.logging.osdf_logging import OOF_OSDFLogMessageHelper as MH
-from osdf.logging.osdf_logging import OOF_OSDFLogMessageFormatter as formatter
-from unittest import mock
+from osdf.logging.osdf_logging import OOFOSDFLogMessageFormatter as formatter
+from osdf.logging.osdf_logging import OOFOSDFLogMessageHelper as MH
 
 
 class TestOSDFLogging(unittest.TestCase):
@@ -45,12 +43,8 @@ class TestOSDFLogging(unittest.TestCase):
         self.json_body = mock.MagicMock()
         self.F = formatter
 
-    def test_log_handlers_pre_onap(self):
-        res = L1.log_handlers_pre_onap()
-        assert type(res) == dict
-
     def test_format_exception(self):
-        res = L1.format_exception(Exception("Some error"))
+        L1.format_exception(Exception("Some error"))
 
     def test_accepted_valid_request(self):
         res = formatter.accepted_valid_request(self.req_id, self.request)
@@ -95,7 +89,7 @@ class TestOSDFLogging(unittest.TestCase):
     def test_error_calling_back(self):
         res = formatter.error_calling_back(self.service_name, self.callback_url, self.err)
         assert res.startswith("Error while posting result to callback URL")
-        
+
     def test_calling_back(self):
         res = formatter.calling_back(self.req_id, self.callback_url)
         assert res.startswith("Posting result to callback URL")
@@ -168,15 +162,6 @@ class TestOSDFLogging(unittest.TestCase):
         """Log the message to error_log.warn and audit_log.warn"""
         L1.warn_audit_error("Some warning message")
 
-    def test_log_message_multi(msg):
-        X = L1.log_handlers_pre_onap()
-        wanted_methods = [
-            X["error"].error, X["error"].warn, X["audit"].info,
-            X["metrics"].info, X["debug"].debug, X["error"].fatal
-            ]
-        L1.log_message_multi("Some log message", *wanted_methods) 
-
 
 if __name__ == "__main__":
     unittest.main()
-