Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure we reset mocked methods on failure #6238

Merged
merged 1 commit into from
Jul 4, 2019

Conversation

johanste
Copy link
Member

@johanste johanste commented Jul 4, 2019

Previously, the mocked out method "leaked" on failure and caused cleanup of tests and/or subsequent tests to fail.

Also changed the previous counter method that was using a test class global and instead provide a callable instance that keeps track of how many times it has been called.

This is one instance of a test that should be cleaned up further.

@adxsdk6
Copy link

adxsdk6 commented Jul 4, 2019

Can one of the admins verify this patch?

@johanste johanste merged commit 7748986 into Azure:cosmos_v3 Jul 4, 2019
bryevdv added a commit that referenced this pull request Jul 5, 2019
* Move code from azure-cosmos-python

* upate for monorepo

* attempt direct emulator download/install

* split get/read database method (#5517)

* split get/read database method

* first stab at updating for Container

* updates for get_user

* get_item -> read_item

* skip failing unicode test

* additional renamings

* add response_hook to Cosmos methods (#5557)

* split get/read database method

* first stab at updating for Container

* add response_hook to CosmosClient methods

* add response_hook to Container methods

* add response_hook to Database methods

* more response hooks

* add RecordHeaders diagnostic

* switch to a fixed set of common headers

* use case insensitive dict

* fix too-restrictive test

* avoid mention of explicit headers

* refine __all__

* response hook history for iteration (#5765)

* response hook history for iteration

* call response_hook with response body

* POC aggregating request_charge

* Bryanv/cosmos api followup (#6134)

* rename get_database -> get_database_client

* rename get_container -> get_container_client

* rename get_user -> get_user_client

* fixup diagnostic test

* Packaging update of azure-cosmos

* Revert "Packaging update of azure-cosmos"

This reverts commit bc68c28.

* revert pacakging bot for now

* Cosmos DB v3 packaging (#6230)

* Cosmos DB v3 packaging

* Missing changelog

* Universal wheel

* run emulator tests on master

* Cosmos v3 test updates (#6236)

* Disable spatial index tests

* Fix client constructor calls

* remove retry test from emulator group

* Cosmos v3 test updates (#6237)

* Fix routing_map_tests

* Ensure we reset mocked methods on failure (#6238)

* Update version number + re-add cosmosEmulator marker for tests (#6243)

* Update version number to beta instead of alpha

* Re-add cosmosEmulator marker to retry tests

* Update version number in changelog.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants