Skip to content

Commit

Permalink
Fix ‘Cannot record any VCR tests’ (#1873)
Browse files Browse the repository at this point in the history
- Some kwargs are required whilst recording. Before, we ignored all kwargs.
- Now, we only remove the kwarg that was causing the issue in Python 3.6
  • Loading branch information
derekbekoe authored Jan 25, 2017
1 parent 6224ec0 commit b927048
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@

# Workaround until https://github.com/kevin1024/vcrpy/issues/293 is fixed.
vcr_connection_request = vcr.stubs.VCRConnection.request
vcr.stubs.VCRConnection.request = lambda *args, **kwargs: vcr_connection_request(*args)


def patch_vcr_connection_request(*args, **kwargs):
kwargs.pop('encode_chunked', None)
vcr_connection_request(*args, **kwargs)


vcr.stubs.VCRConnection.request = patch_vcr_connection_request


def _mock_get_mgmt_service_client(client_type, subscription_bound=True, subscription_id=None,
Expand Down

0 comments on commit b927048

Please sign in to comment.