def testTimeoutCorrectReturnValueInt0(self):
     """
     An input value of 0 should return 0.
     """
     self.assertEqual(_get_timeout(0), 0)
 def testTimeoutCorrectReturnValueInt1000(self):
     """
     An input value of 1000 should return 1.0.
     """
     self.assertEqual(_get_timeout(1000), 1.0)
 def testTimeoutCorrectReturnValueStr0(self):
     """
     An input value of "0" should return 0.
     """
     self.assertEqual(_get_timeout("0"), 0)
 def testTimeoutCorrectReturnValueStr1000(self):
     """
     An input value of "1000" should return 1.0.
     """
     self.assertEqual(_get_timeout("1000"), 1.0)
 def testTimeoutNotInt(self):
     """
     Should fail because the timeout value is not an integer.
     """
     with self.assertRaises(StratisCliEnvironmentError):
         _get_timeout("hello")
 def testTimeoutFloatFloat(self):
     """
     Should fail because the timeout value is a float.
     """
     with self.assertRaises(StratisCliEnvironmentError):
         _get_timeout(2.0)
 def testTimeoutTooSmallInt(self):
     """
     Should fail because the timeout value is too small.
     """
     with self.assertRaises(StratisCliEnvironmentError):
         _get_timeout(-2)
 def testTimeoutTooLargeInt(self):
     """
     Should fail because the timeout value is too large.
     """
     with self.assertRaises(StratisCliEnvironmentError):
         _get_timeout(1073741824)