Closed ghost closed 4 years ago
I am trying to get started with betamax but I keep getting
betamax.exceptions.BetamaxError: A request was made that could not be handled.
when running the code below:
import os import betamax import pytest import scrapy from scrapy import Request with betamax.Betamax.configure() as config: cassette_library_dir = '/tmp/crawler/tests/betamax/cassettes' if not os.path.exists(cassette_library_dir): os.makedirs(cassette_library_dir) config.cassette_library_dir = cassette_library_dir config.preserve_exact_body_bytes = True the_url = 'http://doc.scrapy.org/en/latest/_static/selectors-sample1.html' @pytest.mark.usefixtures('betamax_session') class TestMyHttpClient: def test_get(self, betamax_session): betamax_session.get(the_url)
Any idea why I am getting this?
Never mind - I just had to clear the cache.
I am trying to get started with betamax but I keep getting
when running the code below:
Any idea why I am getting this?