def test_run(self):
     verificator = RangeVerificator()
     verificator.get_value = mock.Mock(return_value=1)
     verificator.lower_bound = 0
     verificator.upper_bound = 2
     verificator.run()
     self.assertTrue(verificator.get_value.called)
 def test_run(self):
     verificator = RangeVerificator()
     verificator.get_value = mock.Mock(return_value=1)
     verificator.lower_bound = 0
     verificator.upper_bound = 2
     verificator.run()
     self.assertTrue(verificator.get_value.called)
 def test_value_over_upper_bound_raises_verification_error(self):
     verificator = RangeVerificator()
     verificator.get_value = mock.Mock(return_value=100)
     verificator.upper_bound = 99
     self.assertRaises(errors.VerificationFailure, verificator.run)
 def test_value_below_lower_bound_raises_verification_error(self):
     verificator = RangeVerificator()
     verificator.get_value = mock.Mock(return_value=99)
     verificator.lower_bound = 100
     self.assertRaises(errors.VerificationFailure, verificator.run)
 def test_value_over_upper_bound_raises_verification_error(self):
     verificator = RangeVerificator()
     verificator.get_value = mock.Mock(return_value=100)
     verificator.upper_bound = 99
     self.assertRaises(errors.VerificationFailure, verificator.run)
 def test_value_below_lower_bound_raises_verification_error(self):
     verificator = RangeVerificator()
     verificator.get_value = mock.Mock(return_value=99)
     verificator.lower_bound = 100
     self.assertRaises(errors.VerificationFailure, verificator.run)