Always use `once` when recording vcr tapes
1 parent ccd7186 commit 9b84e2033d5c2f72dc0a99d0de4a7dc5648faa72
@Simon Hanna Simon Hanna authored on 4 May 2016
Showing 2 changed files
View
14
src/postorius/tests/utils.py
 
FIXTURES_DIR = os.path.join(os.path.abspath(
os.path.dirname(__file__)), 'fixtures', 'vcr_cassettes')
 
VCR_RECORD_MODE = os.environ.get('POSTORIUS_VCR_RECORD_MODE',
getattr(settings, 'VCR_RECORD_MODE', 'once'))
 
MM_VCR = get_vcr(
cassette_library_dir=FIXTURES_DIR,
record_mode=VCR_RECORD_MODE,
)
MM_VCR = get_vcr(cassette_library_dir=FIXTURES_DIR)
 
 
def create_mock_domain(properties=None):
"""Create and return a mocked Domain.
View
5
testing/test_settings.py
'django.contrib.auth.backends.ModelBackend',
'django_browserid.auth.BrowserIDBackend',
)
 
# Set VCR_RECORD_MODE to 'all' to re-record all API responses.
# (Remember to use an empty mailman database!)
VCR_RECORD_MODE = 'once'