You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""This creates 100 licenses and databases.If this passes around ~20 times we can be confident that at least most of ourtool works."""importosimportuuidimportjsonfromdatetimeimportdatefrompathlibimportPathimportvws_web_toolsfromseleniumimportwebdriverdefmain():
# TODO use GitHub secrets for this.email_address=os.environ['VWS_EMAIL_ADDRESS']
password=os.environ['VWS_PASSWORD']
# Short to not hit the max length of the license.random=uuid.uuid4().hex[:5]
today_date=str(date.today())
output_file_path=Path(f'databases_details_{random}.txt')
license_name_start=f'license-ci-{today_date}-{random}-'database_name_start=f'database-ci-{today_date}-{random}-'# We need chromedriver.# On macOS: brew install chromedriverdriver=webdriver.Chrome()
vws_web_tools.log_in(
driver=driver,
email_address=email_address,
password=password,
)
forindexinrange(100):
license_name=license_name_start+str(index)
database_name=database_name_start+str(index)
vws_web_tools.create_license(driver=driver, license_name=license_name)
vws_web_tools.create_database(
driver=driver,
database_name=database_name,
license_name=license_name,
)
details=vws_web_tools.get_database_details(
driver=driver,
database_name=database_name,
)
# TODO verify that none of the database details are emptywithoutput_file_path.open('a') asoutput_file:
output_file.write(json.dumps(details))
output_file.write('\n')
driver.close()
if__name__=='__main__':
main()
The text was updated successfully, but these errors were encountered:
Initial test:
The text was updated successfully, but these errors were encountered: