示例#1
0
文件: tests.py 项目: msabramo/raven
 def test_udp(self):
     dsn = 'udp://*****:*****@sentry.local:9001/1'
     res = {}
     load(dsn, res)
     self.assertEqual('1', res['SENTRY_PROJECT'])
     self.assertEqual('foo', res['SENTRY_PUBLIC_KEY'])
     self.assertEqual('bar', res['SENTRY_SECRET_KEY'])
示例#2
0
 def test_udp(self):
     dsn = 'udp://*****:*****@sentry.local:9001/1'
     res = {}
     load(dsn, res)
     self.assertEquals(res, {
         'SENTRY_PROJECT': '1',
         'SENTRY_SERVERS': ['udp://sentry.local:9001/api/store/'],
         'SENTRY_PUBLIC_KEY': 'foo',
         'SENTRY_SECRET_KEY': 'bar',
     })
示例#3
0
 def test_https_port_80(self):
     dsn = 'https://*****:*****@sentry.local:80/app/1'
     res = {}
     load(dsn, res)
     self.assertEquals(res, {
         'SENTRY_PROJECT': '1',
         'SENTRY_SERVERS': ['https://sentry.local:80/app/api/store/'],
         'SENTRY_PUBLIC_KEY': 'foo',
         'SENTRY_SECRET_KEY': 'bar',
     })
示例#4
0
 def test_basic(self):
     dsn = 'https://*****:*****@sentry.local/1'
     res = {}
     load(dsn, res)
     self.assertEquals(res, {
         'SENTRY_PROJECT': '1',
         'SENTRY_SERVERS': ['https://sentry.local/api/1/store/'],
         'SENTRY_PUBLIC_KEY': 'foo',
         'SENTRY_SECRET_KEY': 'bar',
         'SENTRY_TRANSPORT_OPTIONS': {},
     })
示例#5
0
 def test_options(self):
     dsn = 'http://*****:*****@sentry.local:9001/1?timeout=1'
     res = {}
     load(dsn, res)
     self.assertEquals(res, {
         'SENTRY_PROJECT': '1',
         'SENTRY_SERVERS': ['http://sentry.local:9001/api/1/store/'],
         'SENTRY_PUBLIC_KEY': 'foo',
         'SENTRY_SECRET_KEY': 'bar',
         'SENTRY_TRANSPORT_OPTIONS': {'timeout': '1'},
     })
示例#6
0
 def test_options(self):
     dsn = 'http://*****:*****@sentry.local:9001/1?timeout=1'
     res = {}
     load(dsn, res)
     self.assertEquals(res, {
         'SENTRY_PROJECT': '1',
         'SENTRY_SERVERS': ['http://sentry.local:9001/api/1/store/'],
         'SENTRY_PUBLIC_KEY': 'foo',
         'SENTRY_SECRET_KEY': 'bar',
         'SENTRY_TRANSPORT_OPTIONS': {'timeout': '1'},
     })
示例#7
0
 def test_basic(self):
     dsn = 'https://*****:*****@sentry.local/1'
     res = {}
     load(dsn, res)
     self.assertEquals(res, {
         'SENTRY_PROJECT': '1',
         'SENTRY_SERVERS': ['https://sentry.local/api/1/store/'],
         'SENTRY_PUBLIC_KEY': 'foo',
         'SENTRY_SECRET_KEY': 'bar',
         'SENTRY_TRANSPORT_OPTIONS': {},
     })
示例#8
0
 def test_scope_is_optional(self):
     dsn = 'https://*****:*****@sentry.local/1'
     res = load(dsn)
     self.assertEquals(res, {
         'SENTRY_PROJECT': '1',
         'SENTRY_SERVERS': ['https://sentry.local/api/store/'],
         'SENTRY_PUBLIC_KEY': 'foo',
         'SENTRY_SECRET_KEY': 'bar',
     })