Skip to content

Commit

Permalink
[netjsonconfig-tests] Avoid error logging to print noisy output durin…
Browse files Browse the repository at this point in the history
…g tests #150

Applied `capture_stdout` decorator on noisy tests

Fixes #150
  • Loading branch information
lehone-hp committed Jan 3, 2021
1 parent dbc00c1 commit 0fce9e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/openwrt/test_default.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import unittest

from openwisp_utils.tests import capture_stdout

from netjsonconfig import OpenWrt
from netjsonconfig.utils import _TabsMixin

Expand Down Expand Up @@ -176,6 +178,7 @@ def test_skip(self):
o = OpenWrt({"skipme": {"enabled": True}})
self.assertEqual(o.render(), '')

@capture_stdout()
def test_warning(self):
o = OpenWrt({"luci": [{"unrecognized": True}]})
self.assertEqual(o.render(), '')
Expand Down

0 comments on commit 0fce9e4

Please sign in to comment.