-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pytest fixture to prepare for pytest-httpbin
We add a testing utils class `HttpbinRemote`, which is simply a drop-in replacement for the `httpbin` fixture that pytest-httpbin provides. `HttbinRemote` uses the remotely served version of httpbin. This will allow us to write tests in the style of pytest-httpbin until we can merge PR #164 into master.
- Loading branch information
Showing
5 changed files
with
54 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import pytest | ||
|
||
# This file is automatically discovered by pytest to define | ||
# shared fixtures only once. | ||
|
||
|
||
@pytest.fixture | ||
def httpbin(): | ||
from utils import HttpbinRemote | ||
return HttpbinRemote() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters