summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2017-03-20 00:56:03 +0000
committerrsiddharth <s@ricketyspace.net>2017-03-20 00:56:03 +0000
commit87969fb3f57e84ee070a90ea03126f2aba069ce3 (patch)
tree589d1bd8857426577d164caa39d1d5f92f9e538c
parent9b7dfcb956137ed085e6433180dcd6a24d662b2b (diff)
tests: Update `TestMDLSLogger.test_debug`
* tests/test_markdown_link_style/test_logging.py (TestMDLSLogger.test_debug) (TestMDLSLogger.setup): Update methods.
-rw-r--r--tests/test_markdown_link_style/test_logging.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/test_markdown_link_style/test_logging.py b/tests/test_markdown_link_style/test_logging.py
index cf43768..6478192 100644
--- a/tests/test_markdown_link_style/test_logging.py
+++ b/tests/test_markdown_link_style/test_logging.py
@@ -18,6 +18,10 @@
# along with markdown-link-style (see COPYING). If not, see
# <http://www.gnu.org/licenses/>.
+import sys
+
+from io import StringIO
+
from markdown_link_style.logging import MDLSLogger
class TestMDLSLogger(object):
@@ -26,10 +30,13 @@ class TestMDLSLogger(object):
"""
def setup(self):
- self.logger = MDLSLogger('DebugTest')
+ self.stream = StringIO()
+ self.logger = MDLSLogger('TestLogger', self.stream)
def test_debug(self):
- self.logger.debug('DEBUG::MSG')
+ log_msg = 'DEBUG::MSG'
+ self.logger.debug(log_msg)
+ assert self.stream.getvalue().strip('\n') == log_msg
def test_info(self):
self.logger.info('INFO::MSG')