Completed
Pull Request — master (#2829)
by Lakshmi
06:14
created

FormatResultActionTestCase   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_rendering_works_remote_shell_cmd() 0 5 1
1
import mock
2
3
from st2tests.base import BaseActionTestCase
4
5
from fixtures import REMOTE_SHELL_CMD_EXECUTION_MODEL
6
from format_execution_result import FormatResultAction
7
8
__all__ = [
9
    'FormatResultActionTestCase'
10
]
11
12
class FormatResultActionTestCase(BaseActionTestCase):
13
    action_cls = FormatResultAction
14
15
    @mock.patch.object(FormatResultAction, '_get_execution', mock.MagicMock(
16
        return_value=REMOTE_SHELL_CMD_EXECUTION_MODEL))
17
    def test_rendering_works_remote_shell_cmd(self):
18
        action = self.get_action_instance()
19
        self.assertTrue(action.run(execution_id='57967f9355fc8c19a96d9e4f'))
20