def test_get_field_value_returns_none_invalid_path(self): test_field_object = {"Type":"decimal"} test_field = Field("a.b.c", test_field_object) test_data = {"a":{"c":50}} self.assertIsNone(test_field._get_field_value("a.b", test_data))
def test_get_field_value_succeeds(self): test_field_object = {"Type":"decimal"} test_field = Field("a.b", test_field_object) test_data = {"a":{"b":50}} field_value = test_field._get_field_value("a.b", test_data) self.assertEqual(50, field_value)