Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 88a7ab0

Browse files
author
Siddharta Govindaraj
committed
Using mock.patch as a class decorator
1 parent 50480b4 commit 88a7ab0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stock_alerter/tests/test_action.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
from ..action import PrintAction
55

66

7+
@mock.patch("builtins.print")
78
class PrintActionTest(unittest.TestCase):
8-
@mock.patch("builtins.print")
99
def test_executing_action_prints_message(self, mock_print):
1010
action = PrintAction()
1111
action.execute("GOOG > $10")

0 commit comments

Comments
 (0)