Skip to content
Snippets Groups Projects
Commit 612321b4 authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

Merge branch 'f-fix-login-failed-on-long-request' into 'dev'

parents e15a74fc b8129f07
No related branches found
No related tags found
1 merge request!83Add test for https://gitlab.com/linkahead/linkahead-pylib/-/issues/103
Pipeline #58563 passed
......@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added (for new features)
* Test for [caosdb-pylib#89](https://gitlab.com/linkahead/linkahead-pylib/-/issues/89)
* Test for [caosdb-pylib#103](https://gitlab.com/linkahead/linkahead-pylib/-/issues/103)
* Tests for entity state [caosdb-server!62](https://gitlab.com/caosdb/caosdb-server/-/merge_requests/62)
* Tests for version history
* Tests for inheritance bug (caosdb/caosdb-server!54)
......
......@@ -92,6 +92,26 @@ def test_gitlab_com_89():
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: "
# "https://gitlab.com/linkahead/linkahead-pylib/-/issues/108")
def test_gitlab_com_108():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment