Changeset - 66cd27e7f067
[Not reviewed]
0 1 0
Brett Smith - 4 years ago 2020-05-13 14:25:24
brettcsmith@brettcsmith.org
test_rtutil: Capture debug logs for test_read_only_cache.

To help with SUSE installation, RT#10543.
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
tests/test_rtutil.py
Show inline comments
...
 
@@ -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)
 
        assert rt1.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
0 comments (0 inline, 0 general)