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'])
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', })
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', })
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': {}, })
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'}, })
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', })