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