diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2016-05-14 01:37:41 +0200 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2016-05-14 01:37:41 +0200 |
commit | a4c7f0c36b6ba17f736f76e356102fe214348210 (patch) | |
tree | e2a113436bed06e0393aca733af9655d2dd1cc64 /tests/breadcrumbs | |
parent | c3e3e4dcbb1459e8b93be3bddca4cbcbdb971362 (diff) | |
download | raven-a4c7f0c36b6ba17f736f76e356102fe214348210.tar.gz |
More resilient log reporting.
Diffstat (limited to 'tests/breadcrumbs')
-rw-r--r-- | tests/breadcrumbs/tests.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/breadcrumbs/tests.py b/tests/breadcrumbs/tests.py index ab424d8..00fd463 100644 --- a/tests/breadcrumbs/tests.py +++ b/tests/breadcrumbs/tests.py @@ -56,3 +56,15 @@ class BreadcrumbTestCase(TestCase): assert int(items[3]) == lineno assert items[4] == 'INFO' assert items[5] == 'Hello World!' + + def test_broken_logging(self): + client = Client('http://foo:bar@example.com/0') + with client.context: + log = logging.getLogger('whatever.foo') + log.info('This is a message with %s. %s!', 42) + crumbs = client.context.breadcrumbs.get_buffer() + + assert len(crumbs) == 1 + assert crumbs[0]['type'] == 'default' + assert crumbs[0]['category'] == 'whatever.foo' + assert crumbs[0]['message'] == 'This is a message with %s. %s!' |