Skip to content

Commit

Permalink
caplog: record() and text() are now properties
Browse files Browse the repository at this point in the history
  • Loading branch information
dwaynebailey committed Aug 24, 2016
1 parent 2f9df2c commit 72b693d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/commands/clear_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion tests/misc/lang_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/pootle_fs/matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 72b693d

Please sign in to comment.