def test_that_custom_exclude_paths_are_used(self): application = self.Application() sentry.install(application, exclude_paths=['foo']) self.assertIn('foo', application.sentry_client.exclude_paths) # the following are hard-coded self.assertIn('raven', application.sentry_client.exclude_paths) self.assertIn('sys', application.sentry_client.exclude_paths) self.assertIn('tornado', application.sentry_client.exclude_paths)
def test_that_custom_exclude_paths_are_used(self): application = self.Application() sentry.install(application, exclude_paths=['foo']) self.assertIn('foo', application.sentry_client.exclude_paths) # the following are hard-coded self.assertIn('raven', application.sentry_client.exclude_paths) self.assertIn('sys', application.sentry_client.exclude_paths) self.assertIn('tornado', application.sentry_client.exclude_paths)
def test_that_client_is_not_installed_unless_dsn_exists(self): saved = os.environ.pop('SENTRY_DSN', None) try: application = self.Application() sentry.install(application) self.assertIsNone(application.sentry_client) finally: if saved: os.environ['SENTRY_DSN'] = saved
def test_that_client_is_not_installed_unless_dsn_exists(self): saved = os.environ.pop('SENTRY_DSN', None) try: application = self.Application() sentry.install(application) self.assertIsNone(application.sentry_client) finally: if saved: os.environ['SENTRY_DSN'] = saved
def test_that_environment_is_set_by_default(self): saved = os.environ.pop('ENVIRONMENT', None) try: env = str(uuid.uuid4()) os.environ['ENVIRONMENT'] = env application = self.Application() sentry.install(application) self.assertEqual(application.sentry_client.environment, env) finally: if saved: os.environ['ENVIRONMENT'] = saved
def test_that_environment_is_set_by_default(self): saved = os.environ.pop('ENVIRONMENT', None) try: env = str(uuid.uuid4()) os.environ['ENVIRONMENT'] = env application = self.Application() sentry.install(application) self.assertEqual(application.sentry_client.environment, env) finally: if saved: os.environ['ENVIRONMENT'] = saved
def test_that_client_is_installed(self): application = self.Application() sentry.install(application) self.assertIsInstance(application.sentry_client, raven.Client)
def make_application(app_tags): application = web.Application([(r'/(\S+)', Handler)]) sentry.install(application, include_paths=[__name__], tags=app_tags) return application
def test_that_client_is_installed(self): application = self.Application() sentry.install(application) self.assertIsInstance(application.sentry_client, raven.Client)
def make_application(app_tags): application = web.Application([web.url(r'/(\S+)', Handler)]) sentry.install(application, include_paths=[__name__], tags=app_tags) return application