Add test showing failure

This commit is contained in:
David Cramer 2015-07-10 11:53:45 -06:00
parent c83aedd492
commit 58292d33f3
1 changed files with 9 additions and 0 deletions

View File

@ -9,6 +9,7 @@ import time
from raven.base import Client, ClientState
from raven.exceptions import RateLimited
from raven.transport import AsyncTransport
from raven.transport.http import HTTPTransport
from raven.utils.stacks import iter_stack_frames
from raven.utils import six
from raven.utils.testutils import TestCase
@ -437,3 +438,11 @@ class ClientTest(TestCase):
else:
expected = {'logger': "u'test'", 'foo': "u'bar'"}
self.assertEquals(event['extra'], expected)
def test_transport_registration(self):
client = Client('http://public:secret@example.com/1',
transport=HTTPTransport)
assert type(client.remote.get_transport()) is HTTPTransport
client = Client('sync+http://public:secret@example.com/1')
assert type(client.remote.get_transport()) is HTTPTransport