@@ -13,12 +13,13 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
import contextlib
import itertools
import logging
import re
import pytest
from . import testutil
@@ -211,13 +212,14 @@ def test_no_shared_cache(new_client):
rt2 = rtutil.RT(new_client, cache2)
assert rt1.exists(1)
new_client.TICKET_DATA.clear()
assert not rt2.exists(1)
def test_read_only_cache(new_client, tmp_path):
def test_read_only_cache(new_client, tmp_path, caplog):
caplog.set_level(logging.DEBUG, logger='conservancy_beancount.rtutil')
db_path = tmp_path / 'test.db'
ticket_id, _, expected = EXPECTED_URLS[0]
expected = DEFAULT_RT_URL + expected
with new_cache(db_path) as cache1:
rt1 = rtutil.RT(new_client, cache1)
assert rt1.url(ticket_id) == expected