##// END OF EJS Templates
phabricator: do more of the VCR work in demandimport.deactivated()...
Augie Fackler -
r40414:b015f30a default
parent child Browse files
Show More
@@ -131,14 +131,15 b' def vcrcommand(name, flags, spec):'
131 with hgdemandimport.deactivated():
131 with hgdemandimport.deactivated():
132 import vcr as vcrmod
132 import vcr as vcrmod
133 import vcr.stubs as stubs
133 import vcr.stubs as stubs
134 vcr = vcrmod.VCR(
134 vcr = vcrmod.VCR(
135 serializer=r'json',
135 serializer=r'json',
136 custom_patches=[
136 custom_patches=[
137 (urlmod, 'httpconnection', stubs.VCRHTTPConnection),
137 (urlmod, 'httpconnection', stubs.VCRHTTPConnection),
138 (urlmod, 'httpsconnection', stubs.VCRHTTPSConnection),
138 (urlmod, 'httpsconnection',
139 ])
139 stubs.VCRHTTPSConnection),
140 with vcr.use_cassette(cassette):
140 ])
141 return fn(*args, **kwargs)
141 with vcr.use_cassette(cassette):
142 return fn(*args, **kwargs)
142 return fn(*args, **kwargs)
143 return fn(*args, **kwargs)
143 inner.__name__ = fn.__name__
144 inner.__name__ = fn.__name__
144 return command(name, fullflags, spec)(inner)
145 return command(name, fullflags, spec)(inner)
General Comments 0
You need to be logged in to leave comments. Login now