Closed markfink closed 8 years ago
my problem was related to how I invoke the test using pytest. I found a solution... just want to document it in case sb runs into it. Instead of using @placebo_session I wrote a pytest fixture (uses PLACEBO_MODE env variable, too):
@pytest.fixture(scope='module') # 'function' or 'module'
def boto_session():
session = boto3.session.Session()
pill = placebo.attach(session, data_path=here('./resources/placebo'))
if os.getenv('PLACEBO_MODE').lower() == 'record':
pill.record()
else:
pill.playback()
yield session
I stumbled upon the same thing. I tried to run it with your fixture, but I'm still getting the same error message as you did
new to placebo so this is most likely my fault. Any idea how to fix this?
this is my simple testcase:
I am using placebo in record mode like in the docu: