Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
'pytest-cov>=1.4',
'pytest-django',
'python-coveralls',
'requests',
'tornado',
'webob',
'webtest',
Expand Down
Binary file removed tests/transport/gevent/.tests.py.swo
Binary file not shown.
Empty file.
20 changes: 20 additions & 0 deletions tests/transport/requests/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from __future__ import absolute_import

import mock

from raven.utils.testutils import TestCase
from raven.base import Client


class RequestsTransportTest(TestCase):
def setUp(self):
self.client = Client(
dsn="requests+http://some_username:some_password@localhost:8143/1",
)

@mock.patch('raven.transport.requests.post')
def test_does_send(self, post):
self.client.captureMessage(message='foo')
self.assertEqual(post.call_count, 1)
expected_url = 'http://localhost:8143/api/1/store/'
self.assertEqual(expected_url, post.call_args[0][0])