Merge branch 'master' into master-2
# Conflicts: # LICENSE
This commit is contained in:
15
test/service/webservice/pybin/file_content_response.py
Executable file
15
test/service/webservice/pybin/file_content_response.py
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
__author__ = 'dev'
|
||||
import cgi
|
||||
|
||||
from fake_services.service.webservice.fake_http_request_handler import RESPONSE_PATH_PARAMETER_KEY_NAME
|
||||
|
||||
response_file_path = cgi.FieldStorage()[RESPONSE_PATH_PARAMETER_KEY_NAME].value
|
||||
response_file = open(response_file_path, "r")
|
||||
response_file_content = response_file.read()
|
||||
response_file.close()
|
||||
|
||||
print("\n")
|
||||
print(response_file_content)
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"":
|
||||
{
|
||||
"host_pattern": "10.0.0.1",
|
||||
"path_pattern": "index.php",
|
||||
"protocol_pattern": "http",
|
||||
"response_content_path": "cgi-bin/test.html"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user