-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
146 additions
and
29 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
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
Empty file.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import pytest | ||
import subprocess | ||
import time | ||
|
||
@pytest.fixture(scope='session', autouse=True) | ||
def start_httpbin_container(): | ||
# Setup: Start the Docker container | ||
container_id = subprocess.check_output( | ||
["docker", "run", "-d", "-p", "8000:80", "kennethreitz/httpbin"] | ||
).decode().strip() | ||
|
||
# Wait for the container to be ready | ||
time.sleep(5) # Adjust the sleep time as needed | ||
|
||
yield | ||
|
||
# Teardown: Stop and remove the Docker container | ||
subprocess.run(["docker", "stop", container_id]) | ||
subprocess.run(["docker", "rm", container_id]) |