MCPcopy Create free account
hub / github.com/requests-cache/requests-cache / test_read_only__force_refresh

Function test_read_only__force_refresh

tests/unit/test_session.py:1013–1020  ·  view source on GitHub ↗

force_refresh skips cache read, but read_only still prevents write

(mock_session)

Source from the content-addressed store, hash-verified

1011
1012
1013def test_read_only__force_refresh(mock_session):
1014 """force_refresh skips cache read, but read_only still prevents write"""
1015 mock_session.get(MOCKED_URL)
1016 mock_session.settings.read_only = True
1017
1018 response = mock_session.get(MOCKED_URL, force_refresh=True)
1019 assert response.from_cache is False
1020 assert mock_session.cache.contains(url=MOCKED_URL)
1021
1022
1023@skip_pypy

Callers

nothing calls this directly

Calls 2

getMethod · 0.80
containsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…