Conditions | 2 |
Total Lines | 12 |
Code Lines | 10 |
Lines | 12 |
Ratio | 100 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 0 |
1 | """kytos.cli.commands.web.parser tests.""" |
||
24 | 1 | @staticmethod |
|
25 | 1 | @patch('sys.exit') |
|
26 | 1 | @patch('kytos.cli.commands.web.parser.call') |
|
27 | 1 | @patch('kytos.cli.commands.web.parser.docopt', return_value='args') |
|
28 | 1 | def test_parse__error(*args): |
|
29 | """Test parse method to error case.""" |
||
30 | 1 | (_, mock_call, mock_exit) = args |
|
31 | 1 | mock_call.side_effect = KytosException |
|
32 | 1 | with patch.object(sys, 'argv', ['A', 'B', 'C']): |
|
33 | 1 | parse('argv') |
|
34 | |||
35 | 1 | mock_exit.assert_called() |
|
36 | |||
46 |