Conditions | 4 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | #!/usr/bin/env python3 |
||
17 | def test_cli(self): |
||
18 | """Testing the CLI.""" |
||
19 | |||
20 | with self.assertRaises(SystemExit) as code: |
||
21 | mailbox_cli.main() |
||
22 | |||
23 | self.assertEqual(code.exception.code, 2) |
||
24 | |||
25 | testargs = ["prog", "-s unknown.localhost", "-u test", "-p test"] |
||
26 | with patch.object(sys, 'argv', testargs): |
||
27 | with self.assertRaises(SystemExit) as code: |
||
28 | mailbox_cli.main() |
||
29 | self.assertTrue("wrong server?" in code.exception.code) |
||
30 | |||
34 |