Exemplo n.º 1
0
 def test_setting_regexp(self):
     with Settings(SENTRY_ALLOW_ORIGIN=[
             re.compile('https?\://(.*\.)?example\.com')
     ]):
         self.assertTrue(is_valid_origin('http://example.com'))
Exemplo n.º 2
0
 def test_setting_uri(self):
     with Settings(SENTRY_ALLOW_ORIGIN=['http://example.com']):
         self.assertTrue(is_valid_origin('http://example.com'))
Exemplo n.º 3
0
 def test_setting_empty(self):
     with Settings(SENTRY_ALLOW_ORIGIN=None):
         self.assertFalse(is_valid_origin('http://example.com'))
Exemplo n.º 4
0
 def test_setting_regexp(self):
     with Settings(SENTRY_ALLOW_ORIGIN=[re.compile('https?\://(.*\.)?example\.com')]):
         self.assertTrue(is_valid_origin('http://example.com'))
Exemplo n.º 5
0
 def test_setting_uri(self):
     with Settings(SENTRY_ALLOW_ORIGIN=['http://example.com']):
         self.assertTrue(is_valid_origin('http://example.com'))
Exemplo n.º 6
0
 def test_setting_empty(self):
     with Settings(SENTRY_ALLOW_ORIGIN=None):
         self.assertFalse(is_valid_origin('http://example.com'))