Test Failed
Pull Request — master (#86)
by Daniel
06:22 queued 03:08
created

ExplainShellTest.testExplainShell()   A

Complexity

Conditions 1

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 11
rs 9.95
c 0
b 0
f 0
cc 1
nop 1
1
"""
2
Tests for the Marvin Explain Shell action
3
"""
4
5
from test_action import ActionTest
6
from irc2phpbb import marvin_actions
7
8
class ExplainShellTest(ActionTest):
9
    """Tests for the Marvin Explain Shell action"""
10
    def testExplainShell(self):
11
        """Test that marvin can explain shell commands"""
12
        url = "https://explainshell.com/explain?cmd=pwd"
13
        self.assertActionOutput(marvin_actions.marvinExplainShell, "explain pwd", url)
14
        self.assertActionOutput(marvin_actions.marvinExplainShell, "can you explain pwd", url)
15
        self.assertActionOutput(
16
            marvin_actions.marvinExplainShell,
17
            "förklara pwd|grep -o $user",
18
            f"{url}%7Cgrep+-o+%24user")
19
20
        self.assertActionSilent(marvin_actions.marvinExplainShell, "explains")
21