Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matt Lenc
committed
Nov 26, 2014
1 parent
b9a1aed
commit d6a6a9a
Showing
3 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from raven.contrib.django.models import get_client | ||
from rest_framework.test import APIRequestFactory | ||
|
||
from user_management.models.tests.utils import APIRequestTestCase | ||
|
||
|
||
class TestSentryClient(APIRequestTestCase): | ||
def test_cookies(self): | ||
request = APIRequestFactory().post('/') | ||
request.COOKIES['username'] = 'jimmy' | ||
|
||
raven = get_client() | ||
result = raven.get_data_from_request(request) | ||
|
||
self.assertFalse('cookies' in result['request']) | ||
self.assertFalse('Cookie' in result['request']['headers']) |