Skip to content
This repository has been archived by the owner on Dec 31, 2021. It is now read-only.

RecordMode new_episodes not working properly #7

Open
jmfederico opened this issue Nov 4, 2018 · 1 comment
Open

RecordMode new_episodes not working properly #7

jmfederico opened this issue Nov 4, 2018 · 1 comment

Comments

@jmfederico
Copy link

I have defined a custom VCRTestCase class which sets record_mode to new_episodes but it will not replay recorded episodes.

This is the class:

from vcr_unittest import VCRTestCase as BaseVCRTestCase


class VCRTestCase(BaseVCRTestCase):
    """
    A TestCase that provides VCR integration and records new episodes.
    """

    def _get_vcr_kwargs(self, **kwargs):
        kwargs['record_mode'] = 'new_episodes'
        return kwargs

When set up like that VCR records new episodes but will not use stored recordings.

I am using vcrpy-unittest=0.1.7 and vcrpy=2.0.1

@jmfederico
Copy link
Author

If I change the record_mode to once and run the tests again, then VCR will replay the stored recordings, so it is actually storing them correctly, but when I change it back to new_episodes while keeping the YAML files, it refuses to replay them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant