Esempio n. 1
0
 def test_validateArgs_none_fails(self):
     try:
         validateArgs(None)
         self.fail("Should fail with no arguments")
     except Exception as e:
         self.assertTrue(e.__class__ is ValueError)
Esempio n. 2
0
 def test_validateArgs_unknown_fails(self):
     try:
         validateArgs(["unknown"])
         self.fail("Should fail with unknown argument")
     except Exception as e:
         self.assertTrue(e.__class__ is ValueError)
Esempio n. 3
0
 def test_validateArgs_dark_passes(self):
     self.assertEqual("dark", validateArgs(["dark"]))
Esempio n. 4
0
 def test_validateArgs_device_only_none_fails(self):
     try:
         validateArgs(["-s", "DEVICE_NAME"])
         self.fail("Should fail with no arguments")
     except Exception as e:
         self.assertTrue(e.__class__ is ValueError)