1212
1313class TestIntegration (TestCase ):
1414 @patch (builtin_module + '.open' , mock_open ())
15- @patch ('ntfy.config.yaml. safe_load' )
15+ @patch ('ntfy.config.safe_load' )
1616 @patch ('ntfy.backends.pushover.requests.post' )
1717 def test_pushover (self , mock_post , mock_yamlload ):
1818 mock_yamlload .return_value = {
@@ -22,7 +22,7 @@ def test_pushover(self, mock_post, mock_yamlload):
2222 self .assertEqual (0 , ntfy_main (['send' , 'foobar' ]))
2323
2424 @patch (builtin_module + '.open' , mock_open ())
25- @patch ('ntfy.config.yaml. safe_load' )
25+ @patch ('ntfy.config.safe_load' )
2626 @patch ('ntfy.backends.prowl.requests.post' )
2727 def test_prowl (self , mock_post , mock_yamlload ):
2828 mock_yamlload .return_value = {
@@ -32,7 +32,7 @@ def test_prowl(self, mock_post, mock_yamlload):
3232 ntfy_main (['send' , 'foobar' ])
3333
3434 @patch (builtin_module + '.open' , mock_open ())
35- @patch ('ntfy.config.yaml. safe_load' )
35+ @patch ('ntfy.config.safe_load' )
3636 @patch ('ntfy.backends.pushbullet.requests.post' )
3737 def test_pushbullet (self , mock_post , mock_yamlload ):
3838 mock_yamlload .return_value = {
@@ -42,7 +42,7 @@ def test_pushbullet(self, mock_post, mock_yamlload):
4242 self .assertEqual (0 , ntfy_main (['send' , 'foobar' ]))
4343
4444 @patch (builtin_module + '.open' , mock_open ())
45- @patch ('ntfy.config.yaml. safe_load' )
45+ @patch ('ntfy.config.safe_load' )
4646 @patch ('ntfy.backends.simplepush.requests.post' )
4747 def test_simplepush (self , mock_post , mock_yamlload ):
4848 mock_yamlload .return_value = {
@@ -53,7 +53,7 @@ def test_simplepush(self, mock_post, mock_yamlload):
5353
5454 @patch (builtin_module + '.open' , mock_open ())
5555 @patch ('ntfy.backends.default.platform' , 'linux' )
56- @patch ('ntfy.config.yaml. safe_load' )
56+ @patch ('ntfy.config.safe_load' )
5757 def test_default (self , mock_yamlload ):
5858 old_dbus = modules .get ('dbus' )
5959 modules ['dbus' ] = MagicMock ()
@@ -65,7 +65,7 @@ def test_default(self, mock_yamlload):
6565 modules ['dbus' ] = old_dbus
6666
6767 @patch (builtin_module + '.open' , mock_open ())
68- @patch ('ntfy.config.yaml. safe_load' )
68+ @patch ('ntfy.config.safe_load' )
6969 def test_linux (self , mock_yamlload ):
7070 old_dbus = modules .get ('dbus' )
7171 modules ['dbus' ] = MagicMock ()
@@ -77,7 +77,7 @@ def test_linux(self, mock_yamlload):
7777 modules ['dbus' ] = old_dbus
7878
7979 @patch (builtin_module + '.open' , mock_open ())
80- @patch ('ntfy.config.yaml. safe_load' )
80+ @patch ('ntfy.config.safe_load' )
8181 def test_darwin (self , mock_yamlload ):
8282 old_foundation = modules .get ('Foundation' )
8383 old_objc = modules .get ('objc' )
@@ -97,7 +97,7 @@ def test_darwin(self, mock_yamlload):
9797 modules ['AppKit' ] = old_appkit
9898
9999 @patch (builtin_module + '.open' , mock_open ())
100- @patch ('ntfy.config.yaml. safe_load' )
100+ @patch ('ntfy.config.safe_load' )
101101 def test_win32 (self , mock_yamlload ):
102102 old_win32api = modules .get ('win32api' )
103103 old_win32gui = modules .get ('win32gui' )
@@ -117,7 +117,7 @@ def test_win32(self, mock_yamlload):
117117 modules ['win32con' ] = old_win32con
118118
119119 @patch (builtin_module + '.open' , mock_open ())
120- @patch ('ntfy.config.yaml. safe_load' )
120+ @patch ('ntfy.config.safe_load' )
121121 @patch ('ntfy.backends.xmpp.NtfySendMsgBot' )
122122 def test_xmpp (self , mock_bot , mock_yamlload ):
123123 mock_yamlload .return_value = {'backends' : ['xmpp' ],
@@ -127,7 +127,7 @@ def test_xmpp(self, mock_bot, mock_yamlload):
127127 self .assertEqual (0 , ntfy_main (['send' , 'foobar' ]))
128128
129129 @patch (builtin_module + '.open' , mock_open ())
130- @patch ('ntfy.config.yaml. safe_load' )
130+ @patch ('ntfy.config.safe_load' )
131131 def test_instapush (self , mock_yamlload ):
132132 modules ['instapush' ] = MagicMock ()
133133 modules ['instapush' ].App ().notify .return_value = { 'status' : 200 }
0 commit comments