diff --git a/tests/commands/clear_stats.py b/tests/commands/clear_stats.py index 96bcd9bf7e4..b5438e91661 100644 --- a/tests/commands/clear_stats.py +++ b/tests/commands/clear_stats.py @@ -16,5 +16,5 @@ def test_clear_stats(caplog): call_command('clear_stats', '--project=project0', '--language=language0', '--verbosity=2') - infologs = [l.message for l in caplog.records() if l.levelname == "INFO"] + infologs = [l.message for l in caplog.records if l.levelname == "INFO"] assert "clear_stats over /language0/project0/" in "".join(infologs) diff --git a/tests/misc/lang_mapper.py b/tests/misc/lang_mapper.py index c2b9b283edf..b51bd432744 100644 --- a/tests/misc/lang_mapper.py +++ b/tests/misc/lang_mapper.py @@ -30,7 +30,7 @@ def test_lang_mapper_bad_preset(po_directory, english, caplog): assert mapper.lang_mappings == {} assert ( "Unrecognised lang mapping preset" - in ''.join([l.message for l in caplog.records()])) + in ''.join([l.message for l in caplog.records])) @pytest.mark.django_db diff --git a/tests/pootle_fs/matcher.py b/tests/pootle_fs/matcher.py index 6db349e0487..af7b1384ab1 100644 --- a/tests/pootle_fs/matcher.py +++ b/tests/pootle_fs/matcher.py @@ -280,7 +280,7 @@ def test_matcher_matches_missing_langs(settings, caplog): assert list(matcher.matches(None, None)) == [] assert ( "Could not import files for languages: language0, language1" - in caplog.text()) + in caplog.text) @pytest.mark.django_db