def test_not_str(uri_template): app = falcon.API() with pytest.raises(TypeError): app.add_route(uri_template, ResourceWithId(-1))