예제 #1
0
 def test_superset_uncomparable(self):
     url = URL('http://foo/?bar=eggs&bar=baz&spam=eggs')
     url2 = object()
     with self.assertRaises(TypeError):
         url.is_exact_superset_of(url2)
예제 #2
0
 def test_superset_value_mismatch(self):
     url = URL('http://foo/?bar=baz')
     self.assertFalse(url.is_exact_superset_of('http://foo/?bar=eggs'))
예제 #3
0
 def test_superset_when_true(self):
     url = URL('http://foo/?bar=baz&spam=eggs')
     self.assertTrue(url.is_exact_superset_of('http://foo/?spam=eggs'))
예제 #4
0
 def test_superset_missing_key(self):
     url = URL('http://foo/')
     self.assertFalse(url.is_exact_superset_of('http://foo/?bar=baz'))