当前位置: 首页>>代码示例>>Python>>正文


Python conf.load函数代码示例

本文整理汇总了Python中raven.conf.load函数的典型用法代码示例。如果您正苦于以下问题:Python load函数的具体用法?Python load怎么用?Python load使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了load函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_udp

 def test_udp(self):
     dsn = 'udp://foo:[email protected]: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'])
开发者ID:msabramo,项目名称:raven,代码行数:7,代码来源:tests.py

示例2: test_udp

 def test_udp(self):
     dsn = 'udp://foo:[email protected]: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',
     })
开发者ID:MyCollege,项目名称:raven,代码行数:10,代码来源:tests.py

示例3: test_https_port_80

 def test_https_port_80(self):
     dsn = 'https://foo:[email protected]: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',
     })
开发者ID:MyCollege,项目名称:raven,代码行数:10,代码来源:tests.py

示例4: test_basic

 def test_basic(self):
     dsn = 'https://foo:[email protected]/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': {},
     })
开发者ID:chriskief,项目名称:raven-python,代码行数:11,代码来源:tests.py

示例5: test_options

 def test_options(self):
     dsn = 'http://foo:[email protected]: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'},
     })
开发者ID:chriskief,项目名称:raven-python,代码行数:11,代码来源:tests.py

示例6: test_scope_is_optional

 def test_scope_is_optional(self):
     dsn = 'https://foo:[email protected]/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',
     })
开发者ID:MyCollege,项目名称:raven,代码行数:9,代码来源:tests.py


注:本文中的raven.conf.load函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。