Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (18 sloc) 667 Bytes
import datetime
import time
import pprint
from devops_integration.sandbox_api_python_2_and_3.sandbox_api.sandbox_context import QualiConnectivityParams, \
SandboxContext
def run_some_tests_or_other_code(sandbox):
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(sandbox)
time.sleep(10)
def main():
"""
Example of using sandbox as a context
"""
connectivity_params = QualiConnectivityParams('localhost', '8032', 'admin', 'admin', 'Global')
with SandboxContext(connectivity_params, 'Simple blueprint', datetime.timedelta(hours=2)) as sandbox:
run_some_tests_or_other_code(sandbox)
if __name__ == "__main__":
main()
You can’t perform that action at this time.