def test_schemas_for(self): schema = validationapp.FooBarSchema service = Service("color", "/favorite-color") service.add_view("GET", lambda x: "red", schema=schema) self.assertEquals(len(service.schemas_for("GET")), 1) service.add_view("GET", lambda x: "red", validators=_validator, schema=schema) self.assertEquals(len(service.schemas_for("GET")), 2)