File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,9 +27,10 @@ def test_init(self, login):
2727 for plugin in plugins :
2828 plugin .initialize = mock .MagicMock ()
2929
30+ settings = Settings (MATTERMOST_URL = "test_url.org" , BOT_TOKEN = "random_token" )
3031 # Create a bot and verify that it gets initialized correctly
3132 bot = Bot (
32- settings = Settings ( MATTERMOST_URL = "test_url.org" , BOT_TOKEN = "random_token" ) ,
33+ settings = settings ,
3334 plugins = plugins ,
3435 )
3536 assert bot .driver .options ["url" ] == "test_url.org"
@@ -40,7 +41,7 @@ def test_init(self, login):
4041
4142 # Verify that all of the passed plugins were initialized
4243 for plugin in plugins :
43- assert plugin .initialize .called_once_with (bot .driver )
44+ assert plugin .initialize .assert_called_once_with (bot .driver , bot . plugin_manager , settings )
4445
4546 @mock .patch .multiple ("mmpy_bot.Plugin" , on_start = mock .DEFAULT , on_stop = mock .DEFAULT )
4647 def test_run (self , bot , ** mocks ):
You can’t perform that action at this time.
0 commit comments