def test_path_with_id_parameter(self): path = '/example/{id}/' method = 'GET' view = create_view(views.ExampleDetailView, method, create_request(path)) inspector = AutoSchema() inspector.view = view parameters = inspector._get_path_parameters(path, method) assert parameters == [{ 'description': '', 'in': 'path', 'name': 'id', 'required': True, 'schema': { 'type': 'string', }, }]
def test_path_with_id_parameter(self): path = '/example/{id}/' method = 'GET' view = create_view( views.ExampleDetailView, method, create_request(path) ) inspector = AutoSchema() inspector.view = view parameters = inspector._get_path_parameters(path, method) assert parameters == [{ 'description': '', 'in': 'path', 'name': 'id', 'required': True, 'schema': { 'type': 'string', }, }]