Example #1
0
    def test_numeric_value(self):
        # arrange
        option = Option(name="minPrice", option_type="float")

        # act
        option.value = 30000

        # assert
        self.assertEqual(30000, option.value)
        self.assertIsInstance(option.value, int)
Example #2
0
    def test_str_value(self):
        # arrange
        option = Option(name="colour", option_type="str")

        # act
        option.value = "Black"

        #  assert
        self.assertEqual("Black", option.value)
        self.assertIsInstance(option.value, str)