-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from kuefmz/main
Fixing Dockerfile and refactoring
- Loading branch information
Showing
7 changed files
with
499 additions
and
316 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
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,38 @@ | ||
import requests | ||
|
||
|
||
def mock_response_200(): | ||
mock_response = requests.Response() | ||
mock_response.status_code = 200 | ||
mock_response.url = 'https://example.com/success' | ||
mock_response.headers['Content-Type'] = 'text/html' | ||
mock_response._content = b'<html><body><h1>To be implemented</h1></body></html>' | ||
return mock_response | ||
|
||
|
||
def mock_response_403(): | ||
mock_response = requests.Response() | ||
mock_response.status_code = 403 | ||
mock_response.url = 'https://example.com/forbidden' | ||
mock_response.headers['Content-Type'] = 'text/html' | ||
mock_response._content = b'<html><body><h1>403 Forbidden</h1></body></html>' | ||
return mock_response | ||
|
||
|
||
|
||
def mock_response_404(): | ||
mock_response = requests.Response() | ||
mock_response.status_code = 404 | ||
mock_response.url = 'https://example.com/resource-not-found' | ||
mock_response.headers['Content-Type'] = 'text/html' | ||
mock_response._content = b'<html><body><h1>404 Not Found</h1></body></html>' | ||
return mock_response | ||
|
||
|
||
def mock_response_500(): | ||
mock_response = requests.Response() | ||
mock_response.status_code = 500 | ||
mock_response.url = 'https://example.com/internal-server-error' | ||
mock_response.headers['Content-Type'] = 'text/html' | ||
mock_response._content = b'<html><body><h1>500 Internal Server Error</h1></body></html>' | ||
return mock_response |
Oops, something went wrong.