Newer
Older
Chandrasekhar Ramakrishnan
committed
import random
Chandrasekhar Ramakrishnan
committed
import re
Chandrasekhar Ramakrishnan
committed
from pybis import DataSet
from pybis import Openbis
assert openbis_instance.token is not None
assert openbis_instance.is_token_valid(openbis_instance.token) is True
assert openbis_instance.is_session_active() is True
def test_http_only(openbis_instance):
with pytest.raises(Exception):
new_instance = Openbis(
url="http://localhost",
allow_http_but_do_not_use_this_in_production_and_only_within_safe_networks=True,
)
def test_cached_token(other_openbis_instance):
assert other_openbis_instance.token_path is not None
assert other_openbis_instance.is_token_valid() is True
other_openbis_instance.logout()
assert other_openbis_instance.is_token_valid() is False
def test_create_permId(openbis_instance):
permId = openbis_instance.create_permId()
assert permId is not None
Chandrasekhar Ramakrishnan
committed
ts = m.group(0)
assert ts is not None
count = m.group(1)
assert count is not None