def test_that_a_parameter_can_have_multiple_dependencies(self): query = {"collect": "foo", "period": "week"} validator = ParamDependencyValidator(request_args=query, param_name="collect", depends_on=["group_by", "period"]) assert_that(validator.invalid(), is_(False))
def test_param_dependency_validator_invalidates_correctly(self): query = {"collect": "foo", "group_by": "test"} validator = ParamDependencyValidator(request_args=query, param_name="collect", depends_on=["wibble"]) assert_that(validator.invalid(), is_(True))
def test_that_a_parameter_can_have_multiple_dependencies(self): query = { "collect": "foo", "period": "week" } validator = ParamDependencyValidator(request_args=query, param_name="collect", depends_on=["group_by", "period"]) assert_that(validator.invalid(), is_(False))
def test_param_dependency_validator_invalidates_correctly(self): query = { "collect": "foo", "group_by": "test" } validator = ParamDependencyValidator(request_args=query, param_name="collect", depends_on=["wibble"]) assert_that(validator.invalid(), is_(True))