コード例 #1
0
ファイル: test_service.py プロジェクト: vincentbernat/Kitero
 def test_with_incorrect_args(self):
     """Run the service with options not set correctly"""
     with self.assertRaises(SystemExit) as se:
         Service.run(["-l"])
     self.assertNotEqual(se.exception.code, 0)
     with self.assertRaises(SystemExit) as se:
         Service.run(["opt1", "opt2"])
     self.assertNotEqual(se.exception.code, 0)
コード例 #2
0
 def test_with_incorrect_args(self):
     """Run the service with options not set correctly"""
     with self.assertRaises(SystemExit) as se:
         Service.run(["-l"])
     self.assertNotEqual(se.exception.code, 0)
     with self.assertRaises(SystemExit) as se:
         Service.run(["opt1", "opt2"])
     self.assertNotEqual(se.exception.code, 0)
コード例 #3
0
 def test_with_inexistant_configuration(self):
     """Run the service with a missing configuration file"""
     with self.assertRaises(SystemExit) as se:
         Service.run(["/non/existant/config/file.yaml"])
     self.assertNotEqual(se.exception.code, 0)
コード例 #4
0
 def test_with_unknown_args(self):
     """Run the service with incorrect args"""
     with self.assertRaises(SystemExit) as se:
         Service.run(["-y", "squid"])
     self.assertNotEqual(se.exception.code, 0)
コード例 #5
0
 def test_without_args(self):
     """Run the service without arguments"""
     with self.assertRaises(SystemExit) as se:
         Service.run([])
     self.assertNotEqual(se.exception.code, 0)
コード例 #6
0
ファイル: test_service.py プロジェクト: vincentbernat/Kitero
 def test_with_inexistant_configuration(self):
     """Run the service with a missing configuration file"""
     with self.assertRaises(SystemExit) as se:
         Service.run(["/non/existant/config/file.yaml"])
     self.assertNotEqual(se.exception.code, 0)
コード例 #7
0
ファイル: test_service.py プロジェクト: vincentbernat/Kitero
 def test_with_unknown_args(self):
     """Run the service with incorrect args"""
     with self.assertRaises(SystemExit) as se:
         Service.run(["-y", "squid"])
     self.assertNotEqual(se.exception.code, 0)
コード例 #8
0
ファイル: test_service.py プロジェクト: vincentbernat/Kitero
 def test_without_args(self):
     """Run the service without arguments"""
     with self.assertRaises(SystemExit) as se:
         Service.run([])
     self.assertNotEqual(se.exception.code, 0)