示例#1
0
class FixedValueProviderTest(unittest.TestCase):
  """Test class for FixedValueProvider.
  """

  def setUp(self):
    self.provider = FixedValueProvider()

  def tearDown(self):
    pass

  def testMissingParameter(self):
    """Tests getValue() when no parameter values are supplied.
    """
    self.assertRaises(MissingParameterError, self.provider.getValue)

  def testGetValue(self):
    """Tests getValue().
    """
    value = "asdf"
    self.provider.param_values = {"value": value}
    self.assertEquals(self.provider.getValue(), value)

    value = 37
    self.provider.param_values = {"value": value}
    self.assertEquals(self.provider.getValue(), value)
示例#2
0
 def setUp(self):
   self.provider = FixedValueProvider()