Skip to content
Snippets Groups Projects
Commit 61a27978 authored by Swen Vermeul's avatar Swen Vermeul
Browse files

changed connection to localhost:20000, create a new space every time and do...

changed connection to localhost:20000, create a new space every time and do not rely on DEFAULT space
parent 17e46209
No related branches found
No related tags found
No related merge requests found
......@@ -3,13 +3,17 @@ import time
from pybis import Openbis
openbis_url = 'https://localhost:8443'
admin_username = 'admin'
admin_password = 'changeit'
openbis_url = 'http://localhost:20000'
admin_username = 'openbis_test_js'
admin_password = 'password'
@pytest.yield_fixture(scope="module")
def openbis_instance():
instance = Openbis(url=openbis_url, verify_certificates=False)
instance = Openbis(
url=openbis_url,
verify_certificates=False,
allow_http_but_do_not_use_this_in_production_and_only_within_safe_networks=True
)
print("\nLOGGING IN...")
instance.login(admin_username, admin_password)
yield instance
......@@ -19,10 +23,20 @@ def openbis_instance():
@pytest.yield_fixture(scope="module")
def space():
o = Openbis(url=openbis_url, verify_certificates=False)
o = Openbis(
url=openbis_url,
verify_certificates=False,
allow_http_but_do_not_use_this_in_production_and_only_within_safe_networks=True
)
o.login(admin_username, admin_password)
space_exists = o.get_space(code='DEFAULT')
# create a space
timestamp = time.strftime('%a_%y%m%d_%H%M%S').upper()
space_name = 'test_space_' + timestamp
space = o.new_space(code=space_name)
space.save()
space_exists = o.get_space(code=space_name)
yield space_exists
# teardown
o.logout()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment