예제 #1
0
파일: tests.py 프로젝트: zozzz/raven-python
 def test_setting_regexp(self):
     with Settings(SENTRY_ALLOW_ORIGIN=[re.compile('https?\://(.*\.)?example\.com')]):
         assert is_valid_origin('http://example.com')
예제 #2
0
파일: tests.py 프로젝트: zozzz/raven-python
 def test_setting_empty(self):
     with Settings(SENTRY_ALLOW_ORIGIN=None):
         assert not is_valid_origin('http://example.com')
예제 #3
0
파일: tests.py 프로젝트: zozzz/raven-python
 def test_setting_uri(self):
     with Settings(SENTRY_ALLOW_ORIGIN=['http://example.com']):
         assert is_valid_origin('http://example.com')
예제 #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"))
예제 #5
0
 def test_setting_all(self):
     with Settings(SENTRY_ALLOW_ORIGIN='*'):
         self.assertTrue(is_valid_origin('http://example.com'))
예제 #6
0
 def test_setting_empty(self):
     with Settings(SENTRY_ALLOW_ORIGIN=None):
         self.assertFalse(is_valid_origin("http://example.com"))
예제 #7
0
 def test_setting_uri(self):
     with Settings(SENTRY_ALLOW_ORIGIN=["http://example.com"]):
         self.assertTrue(is_valid_origin("http://example.com"))
예제 #8
0
 def test_setting_all(self):
     with Settings(SENTRY_ALLOW_ORIGIN='*'):
         self.assertTrue(is_valid_origin('http://example.com'))
예제 #9
0
 def test_setting_regexp(self):
     with Settings(SENTRY_ALLOW_ORIGIN=[re.compile('https?\://(.*\.)?example\.com')]):
         assert is_valid_origin('http://example.com')
예제 #10
0
 def test_setting_uri(self):
     with Settings(SENTRY_ALLOW_ORIGIN=['http://example.com']):
         assert is_valid_origin('http://example.com')
예제 #11
0
 def test_setting_empty(self):
     with Settings(SENTRY_ALLOW_ORIGIN=None):
         assert not is_valid_origin('http://example.com')
예제 #12
0
파일: tests.py 프로젝트: recht/raven-python
 def test_setting_all(self):
     with Settings(SENTRY_ALLOW_ORIGIN="*"):
         assert is_valid_origin("http://example.com")