taverntesting / tavern

A command-line tool and Python library and Pytest plugin for automated testing of RESTful APIs, with a simple, concise and flexible YAML-based syntax
https://taverntesting.github.io/
MIT License
1.02k stars 193 forks source link

Try to use the external function in the URL #875

Closed IrisBlume-dot closed 12 months ago

IrisBlume-dot commented 1 year ago

Hi I want to get an ID value from another program and splice it into the URL. Similar to: http://localhost:7200/api/manager/system/organizations/{id} so I try to use external function,

  - name: Delete a user
    request:
      method: DELETE
      url:
        $ext:
          function: web.common:id_query
    response:
      status_code: 200

But there seems to be an anomaly. Is this usage supported?

michaelboulton commented 12 months ago

Fixed in 2.4.0.