GitBucket
Toggle navigation
Pull requests
Issues
Snippets
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Commit Graphs
Network
Fork
: 0
kalle
/
postorius
Browse code
Always use `once` when recording vcr tapes
master
1 parent
ccd7186
commit
9b84e2033d5c2f72dc0a99d0de4a7dc5648faa72
Simon Hanna
authored
on 4 May 2016
Patch
Unified
Split
Showing
2 changed files
+7
-7
■
■
■
■
■
src/postorius/tests/utils.py
+0
-5
■
■
■
■
■
testing/test_settings.py
Ignore Space
Show notes
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.
Ignore Space
Show notes
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'
Show line notes below