Skip to content
Snippets Groups Projects
Merged I. Nüske requested to merge f-fix-login-failed-on-long-request into dev
Files
2
+ 20
0
@@ -92,6 +92,26 @@ def test_gitlab_com_89():
@@ -92,6 +92,26 @@ def test_gitlab_com_89():
assert cont_from_xml[0].name == rt.name
assert cont_from_xml[0].name == rt.name
 
def test_gitlab_com_103():
 
"""
 
Test that after causing an UriTooLong error the used auth_token
 
is still valid.
 
 
See https://gitlab.com/linkahead/linkahead-pylib/-/issues/103 and
 
https://gitlab.indiscale.com/caosdb/customers/f-fit/management/-/issues/82
 
"""
 
# Configure connection to use auth_token
 
auth_token = db.get_connection()._authenticator.auth_token
 
db.configure_connection(auth_token=auth_token)
 
 
# Trigger UriTooLong error and check correct error thrown
 
c = db.Container()
 
c.extend([db.Record(id=i) for i in range(1000, 5000)])
 
with pytest.raises(db.exceptions.TransactionError) as te:
 
c.retrieve()
 
assert "authentication token" not in str(te)
 
 
# @pytest.mark.xfail(reason="Entities with many, long, properties: "
# @pytest.mark.xfail(reason="Entities with many, long, properties: "
# "https://gitlab.com/linkahead/linkahead-pylib/-/issues/108")
# "https://gitlab.com/linkahead/linkahead-pylib/-/issues/108")
def test_gitlab_com_108():
def test_gitlab_com_108():
Loading