Commit d3668365 authored by Trevor Cappallo's avatar Trevor Cappallo
Browse files

add call wrapper unit test

parent e11cbc45
......@@ -56,7 +56,8 @@ def __exit_handler(logger, notify):
class OperationalLogger:
"""Main class for Operational Logging."""
"""Main class for Operational Logging."""
DEFAULT_LOG_FORMAT_FILE = '[%(asctime)s][%(levelname)5s][p%(process)d][%(filename)s:%(lineno)d] %(message)s'
DEFAULT_LOG_FORMAT_CONSOLE = '%(asctime)s (%(levelname)5s) [%(filename)s:%(lineno)d] %(message)s'
#!/usr/bin/env python
"""Unit tests for OperationalLogging."""
import unittest
from import raises, eq_
import logging
import OperationalLogger as OpLog
import subprocess
class TestCallWrappers(unittest.TestCase):
def setUp(self):
def tearDown(self):
def test_call_wrappers(self):
test_cmd = ["ls", "/home", "-lart"]
eq_(subprocess.check_call(test_cmd), OpLog.check_call(test_cmd))
eq_(subprocess.check_output(test_cmd), OpLog.check_output(test_cmd))
if __name__ == '__main__':
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment