test: don't raise RuntimeError for rate limited logs

This commit is contained in:
lilydjwg 2019-04-08 12:15:49 +08:00
parent 0f101bda4d
commit cc763205e8
1 changed files with 2 additions and 1 deletions

View File

@ -65,7 +65,8 @@ def raise_on_logger_msg():
if method_name in ('warning', 'error'):
if 'exc_info' in event_dict:
raise event_dict['exc_info']
raise RuntimeError(event_dict['event'])
if not event_dict['event'].startswith('rate limited'):
raise RuntimeError(event_dict['event'])
return event_dict['event']
structlog.configure([proc])