This repository has been archived by the owner on Mar 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from marvinpinto/help-ping-plugins
Allow each plugin to set their Help strings directly
- Loading branch information
Showing
9 changed files
with
97 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import asynctest | ||
from asynctest.mock import patch | ||
from asynctest.mock import MagicMock | ||
|
||
|
||
class TestRobotHelpMessages(asynctest.TestCase): | ||
|
||
def setUp(self): | ||
patcher1 = patch('charlesbot.robot.Robot.initialize_robot') | ||
self.addCleanup(patcher1.stop) | ||
self.mock_initialize_robot = patcher1.start() | ||
|
||
from charlesbot.robot import Robot | ||
self.robot = Robot() | ||
|
||
@asynctest.ignore_loop | ||
def test_empty_plugin_list(self): | ||
self.robot.plugin_list = [] | ||
self.robot.initialize_static_plugins() | ||
self.assertEqual(len(self.robot.plugin_list), 1) | ||
|
||
@asynctest.ignore_loop | ||
def test_plugin_list_one_entry(self): | ||
plugin1 = MagicMock() | ||
self.robot.plugin_list = [plugin1] | ||
self.robot.initialize_static_plugins() | ||
self.assertEqual(len(self.robot.plugin_list), 2) | ||
|
||
@asynctest.ignore_loop | ||
def test_plugin_list_two_entries(self): | ||
plugin1 = MagicMock() | ||
plugin2 = MagicMock() | ||
self.robot.plugin_list = [plugin1, plugin2] | ||
self.robot.initialize_static_plugins() | ||
self.assertEqual(len(self.robot.plugin_list), 3) |