summaryrefslogtreecommitdiff
path: root/tests/processors
diff options
context:
space:
mode:
authorDavid Cramer <cramer@dropbox.com>2014-05-20 12:02:18 -0700
committerDavid Cramer <cramer@dropbox.com>2014-05-20 12:02:18 -0700
commit39c65bf8b500ed62d8469f5bc7ffe08badcf194c (patch)
tree884ccf1cd55748e73da5d8ea19f04c2a3cf6f6d1 /tests/processors
parent757e060901b99fef6bb2fa6e0d4b1b79ef5e015b (diff)
downloadraven-39c65bf8b500ed62d8469f5bc7ffe08badcf194c.tar.gz
Update interfaces to use protocol 5/aliases
Diffstat (limited to 'tests/processors')
-rw-r--r--tests/processors/tests.py43
1 files changed, 21 insertions, 22 deletions
diff --git a/tests/processors/tests.py b/tests/processors/tests.py
index 794f4b8..ae23096 100644
--- a/tests/processors/tests.py
+++ b/tests/processors/tests.py
@@ -37,7 +37,7 @@ class SantizePasswordsProcessorTest(TestCase):
def test_stacktrace(self):
data = {
- 'sentry.interfaces.Stacktrace': {
+ 'stacktrace': {
'frames': [{'vars': VARS}],
}
}
@@ -45,8 +45,8 @@ class SantizePasswordsProcessorTest(TestCase):
proc = SanitizePasswordsProcessor(Mock())
result = proc.process(data)
- self.assertTrue('sentry.interfaces.Stacktrace' in result)
- stack = result['sentry.interfaces.Stacktrace']
+ self.assertTrue('stacktrace' in result)
+ stack = result['stacktrace']
self.assertTrue('frames' in stack)
self.assertEquals(len(stack['frames']), 1)
frame = stack['frames'][0]
@@ -55,7 +55,7 @@ class SantizePasswordsProcessorTest(TestCase):
def test_http(self):
data = {
- 'sentry.interfaces.Http': {
+ 'request': {
'data': VARS,
'env': VARS,
'headers': VARS,
@@ -66,26 +66,25 @@ class SantizePasswordsProcessorTest(TestCase):
proc = SanitizePasswordsProcessor(Mock())
result = proc.process(data)
- self.assertTrue('sentry.interfaces.Http' in result)
- http = result['sentry.interfaces.Http']
+ self.assertTrue('request' in result)
+ http = result['request']
for n in ('data', 'env', 'headers', 'cookies'):
self.assertTrue(n in http)
self._check_vars_sanitized(http[n], proc)
def test_querystring_as_string(self):
data = {
- 'sentry.interfaces.Http': {
- 'query_string':
- 'foo=bar&password=hello&the_secret=hello'
- '&a_password_here=hello&api_key=secret_key',
+ 'request': {
+ 'query_string': 'foo=bar&password=hello&the_secret=hello'
+ '&a_password_here=hello&api_key=secret_key',
}
}
proc = SanitizePasswordsProcessor(Mock())
result = proc.process(data)
- self.assertTrue('sentry.interfaces.Http' in result)
- http = result['sentry.interfaces.Http']
+ self.assertTrue('request' in result)
+ http = result['request']
self.assertEquals(
http['query_string'],
'foo=bar&password=%(m)s&the_secret=%(m)s'
@@ -93,7 +92,7 @@ class SantizePasswordsProcessorTest(TestCase):
def test_querystring_as_string_with_partials(self):
data = {
- 'sentry.interfaces.Http': {
+ 'request': {
'query_string': 'foo=bar&password&baz=bar',
}
}
@@ -101,8 +100,8 @@ class SantizePasswordsProcessorTest(TestCase):
proc = SanitizePasswordsProcessor(Mock())
result = proc.process(data)
- self.assertTrue('sentry.interfaces.Http' in result)
- http = result['sentry.interfaces.Http']
+ self.assertTrue('request' in result)
+ http = result['request']
self.assertEquals(http['query_string'], 'foo=bar&password&baz=bar' % dict(m=proc.MASK))
def test_sanitize_credit_card(self):
@@ -120,7 +119,7 @@ class SantizePasswordsProcessorTest(TestCase):
class RemovePostDataProcessorTest(TestCase):
def test_does_remove_data(self):
data = {
- 'sentry.interfaces.Http': {
+ 'request': {
'data': 'foo',
}
}
@@ -128,22 +127,22 @@ class RemovePostDataProcessorTest(TestCase):
proc = RemovePostDataProcessor(Mock())
result = proc.process(data)
- self.assertTrue('sentry.interfaces.Http' in result)
- http = result['sentry.interfaces.Http']
+ self.assertTrue('request' in result)
+ http = result['request']
self.assertFalse('data' in http)
class RemoveStackLocalsProcessorTest(TestCase):
def test_does_remove_data(self):
data = {
- 'sentry.interfaces.Stacktrace': {
- 'frames': [{'vars': VARS,}],
+ 'stacktrace': {
+ 'frames': [{'vars': VARS}],
}
}
proc = RemoveStackLocalsProcessor(Mock())
result = proc.process(data)
- self.assertTrue('sentry.interfaces.Stacktrace' in result)
- stack = result['sentry.interfaces.Stacktrace']
+ assert 'stacktrace' in result
+ stack = result['stacktrace']
for frame in stack['frames']:
self.assertFalse('vars' in frame)