Closed mojito317 closed 3 years ago
CHANGES.md
Merges #474 and tests.
One sentence in the pydoc was a little bit misleading, so I changed it to:
Dictates whether a remote request is made to retrieve the doc, if it is not present in the local cache.
Extended the tests to cover the new behaviour based on the proposed behaviour table.
db['foo']
True
False
KeyError
db.get('foo')
None
db.get('foo', remote=True)
New assertions to cover the new feature to:
test_create_document_with_id
test_create_document_that_already_exists
test_create_document_without_id
test_create_design_document
test_create_empty_document
New test cases:
test_get_non_existing_document_from_remote
test_get_non_existing_document_from_cache
test_get_document_from_cache
test_get_document_from_remote
Thank you @dominickj-tdi for the implementation. Thanks, @ricellis, and @emlaver for the reviews. I'm about to merge this.
Checklist
CHANGES.md
) or test/build only changesDescription
Merges #474 and tests.
Approach
One sentence in the pydoc was a little bit misleading, so I changed it to:
Extended the tests to cover the new behaviour based on the proposed behaviour table.
Proposed behaviour
db['foo']
True
True
test_create_document_without_id
test_create_design_document
test_create_empty_document
db['foo']
False
True
db['foo']
False
False
KeyError
db['foo']
True
False
db.get('foo')
True
True
test_create_document_without_id
test_create_design_document
db.get('foo')
False
True
None
db.get('foo')
False
False
None
db.get('foo')
True
False
db.get('foo', remote=True)
True
True
test_create_document_without_id
test_create_design_document
test_create_empty_document
db.get('foo', remote=True)
False
True
db.get('foo', remote=True)
False
False
None
db.get('foo', remote=True)
True
False
Testing
New assertions to cover the new feature to:
test_create_document_with_id
test_create_document_that_already_exists
test_create_document_without_id
test_create_design_document
test_create_empty_document
New test cases:
test_get_non_existing_document_from_remote
test_get_non_existing_document_from_cache
test_get_document_from_cache
test_get_document_from_remote
Monitoring and Logging