def test_query_valid(self): param = Parameter('param', 'query') value = 'test' result = param.cast(value) assert result == value
def test_deprecated(self): param = Parameter('param', 'query', deprecated=True) value = 'test' with pytest.warns(DeprecationWarning): result = param.cast(value) assert result == value
def test_query_empty(self): param = Parameter('param', 'query') value = '' with pytest.raises(EmptyParameterValue): param.cast(value)