| 1 | import pytestscip-python python pytest 9.0.3 pytest/__init__: |
| 2 | import unittestscip-python python python-stdlib 3.11 unittest/__init__: |
| 3 | |
| 4 | from betamaxscip-python python betamax 0.9.0 betamax/__init__: import Betamax, BetamaxError |
| 5 | from requestsscip-python python requests 2.32.5 requests/__init__: import Sessionscip-python python betamax 0.9.0 `requests.sessions`/Session# |
| 6 | |
| 7 | |
| 8 | class TestOncePreventsNewInteractionsscip-python python betamax 0.9.0 `tests.regression.test_once_prevents_new_interactions`/TestOncePreventsNewInteractions#(unittestscip-python python python-stdlib 3.11 unittest/__init__:.TestCasescip-python python betamax 0.9.0 `unittest.case`/TestCase#): |
| 9 | |
| 10 | """Test that using a cassette with once record mode prevents new requests. |
| 11 | |
| 12 | """ |
| 13 | |
| 14 | def test_once_prevents_new_requestsscip-python python betamax 0.9.0 `tests.regression.test_once_prevents_new_interactions`/TestOncePreventsNewInteractions#test_once_prevents_new_requests().(selfscip-python python betamax 0.9.0 `tests.regression.test_once_prevents_new_interactions`/TestOncePreventsNewInteractions#test_once_prevents_new_requests().(self)): |
| 15 | s = Sessionscip-python python betamax 0.9.0 `requests.sessions`/Session#() |
| 16 | with Betamax(s).use_cassette('once_record_mode'): |
| 17 | with pytestscip-python python pytest 9.0.3 pytest/__init__:.raises(BetamaxError): |
| 18 | s.get('http://example.com') |