pytest-dev / pytest-dev/pytest-localserver

Feature request: support different end points

Open
#43 19 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
37
Forks
12
Avg merge
12h 27m
Merged PRs (30d)
1

Description

It looks like that local server can serve only one request. What will be the recommended path to serve different content depending on different URL path?
example.com/one -> serve [200, "OK"]
example.com/two -> serve [201, {"json": "data"}]

would be cool if this functionality could be expanded.

for the moment it looks to be possible to achieve it with https://github.com/csernazs/pytest-httpserver

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named in the issue. Start by locating the local server implementation and existing tests, then determine how URL-path-specific responses should be configured. Done means the documented examples for /one and /two work independently and are covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.