예제 #1
0
 def test_garbageMatch(self):
     r = 'http://example.com/return.to'
     self.failUnless(
         trustroot.returnToMatches([
             'This is not a URL at all. In fact, it has characters, '
             'like "<" that are not allowed in URLs', r
         ], r))
예제 #2
0
 def test_garbageMatch(self):
     r = 'http://example.com/return.to'
     self.failUnless(trustroot.returnToMatches(
         ['This is not a URL at all. In fact, it has characters, '
          'like "<" that are not allowed in URLs',
          r],
         r))
예제 #3
0
 def test_noMatch(self):
     r = 'http://example.com/return.to'
     self.failIf(trustroot.returnToMatches(
         [r],
         'http://example.com/xss_exploit'))
예제 #4
0
 def test_wildcard(self):
     self.failIf(trustroot.returnToMatches(
         ['http://*.example.com/return.to'],
         'http://example.com/return.to'))
예제 #5
0
 def test_descendant(self):
     r = 'http://example.com/return.to'
     self.failUnless(trustroot.returnToMatches(
         [r],
         'http://example.com/return.to/user:joe'))
예제 #6
0
 def test_exactMatch(self):
     r = 'http://example.com/return.to'
     self.failUnless(trustroot.returnToMatches([r], r))
예제 #7
0
 def test_noEntries(self):
     self.failIf(trustroot.returnToMatches([], 'anything'))
예제 #8
0
 def test_noMatch(self):
     r = 'http://example.com/return.to'
     self.failIf(
         trustroot.returnToMatches([r], 'http://example.com/xss_exploit'))
예제 #9
0
 def test_wildcard(self):
     self.failIf(
         trustroot.returnToMatches(['http://*.example.com/return.to'],
                                   'http://example.com/return.to'))
예제 #10
0
 def test_descendant(self):
     r = 'http://example.com/return.to'
     self.failUnless(
         trustroot.returnToMatches([r],
                                   'http://example.com/return.to/user:joe'))
예제 #11
0
 def test_exactMatch(self):
     r = 'http://example.com/return.to'
     self.failUnless(trustroot.returnToMatches([r], r))
예제 #12
0
 def test_noEntries(self):
     self.failIf(trustroot.returnToMatches([], 'anything'))