diff --git a/arango/collection.py b/arango/collection.py index c03c62b..446200f 100644 --- a/arango/collection.py +++ b/arango/collection.py @@ -637,8 +637,6 @@ def has( ) def response_handler(resp: Response) -> bool: - if resp.error_code == 1202: - return False if resp.status_code == 412: raise DocumentRevisionError(resp, request) if resp.status_code == 404: diff --git a/tests/test_document.py b/tests/test_document.py index 8c755eb..805486f 100644 --- a/tests/test_document.py +++ b/tests/test_document.py @@ -1554,7 +1554,7 @@ def test_document_has(col, bad_col, docs): with assert_raises(DocumentRevisionError) as err: col.has(doc_input, rev=bad_rev, check_rev=True) - assert err.value.error_code in {412, 1200} + assert err.value.error_code == 412 # Test existing documents with bad revision for doc_input in [ @@ -1564,15 +1564,15 @@ def test_document_has(col, bad_col, docs): ]: with assert_raises(DocumentRevisionError) as err: col.has(doc_input) - assert err.value.error_code in {412, 1200} + assert err.value.error_code == 412 with assert_raises(DocumentRevisionError) as err: col.has(doc_input, rev=bad_rev) - assert err.value.error_code in {412, 1200} + assert err.value.error_code == 412 with assert_raises(DocumentRevisionError) as err: col.has(doc_input, rev=bad_rev, check_rev=True) - assert err.value.error_code in {412, 1200} + assert err.value.error_code == 412 assert doc_input in col assert col.has(doc_input, rev=rev, check_rev=True) is True @@ -1651,12 +1651,12 @@ def test_document_has(col, bad_col, docs): # Test get with bad database with assert_raises(DocumentInError) as err: bad_col.has(doc_key) - assert err.value.error_code in {11, 401} + assert err.value.error_code == 401 # Test contains with bad database with assert_raises(DocumentInError) as err: assert doc_key in bad_col - assert err.value.error_code in {11, 401} + assert err.value.error_code == 401 def test_document_get(col, bad_col, docs):