예제 #1
0
 def test_parse_setheaders(self):
     x = setheaders.parse_setheader("/foo/bar/voing")
     assert x == ("foo", "bar", "voing")
     x = setheaders.parse_setheader("/foo/bar/vo/ing/")
     assert x == ("foo", "bar", "vo/ing/")
     x = setheaders.parse_setheader("/bar/voing")
     assert x == (".*", "bar", "voing")
     tutils.raises("invalid replacement", setheaders.parse_setheader, "/")
예제 #2
0
 def test_parse_setheaders(self):
     x = setheaders.parse_setheader("/foo/bar/voing")
     assert x == ("foo", "bar", "voing")
     x = setheaders.parse_setheader("/foo/bar/vo/ing/")
     assert x == ("foo", "bar", "vo/ing/")
     x = setheaders.parse_setheader("/bar/voing")
     assert x == (".*", "bar", "voing")
     tutils.raises("invalid replacement", setheaders.parse_setheader, "/")
예제 #3
0
 def test_parse_setheaders(self):
     x = setheaders.parse_setheader("/foo/bar/voing")
     assert x == ("foo", "bar", "voing")
     x = setheaders.parse_setheader("/foo/bar/vo/ing/")
     assert x == ("foo", "bar", "vo/ing/")
     x = setheaders.parse_setheader("/bar/voing")
     assert x == (".*", "bar", "voing")
     with pytest.raises(Exception, match="Invalid replacement"):
         setheaders.parse_setheader("/")
예제 #4
0
 def test_parse_setheaders(self):
     x = setheaders.parse_setheader("/foo/bar/voing")
     assert x == ("foo", "bar", "voing")
     x = setheaders.parse_setheader("/foo/bar/vo/ing/")
     assert x == ("foo", "bar", "vo/ing/")
     x = setheaders.parse_setheader("/bar/voing")
     assert x == (".*", "bar", "voing")
     with pytest.raises(Exception, match="Invalid replacement"):
         setheaders.parse_setheader("/")
예제 #5
0
 def setheaders(self):
     data = []
     for d in self.master.options.setheaders:
         if isinstance(d, str):
             data.append(setheaders.parse_setheader(d))
         else:
             data.append(d)
     self.master.view_grideditor(
         grideditor.SetHeadersEditor(
             self.master, data, self.master.options.setter("setheaders")))
예제 #6
0
 def setheaders(self):
     data = []
     for d in self.master.options.setheaders:
         if isinstance(d, str):
             data.append(setheaders.parse_setheader(d))
         else:
             data.append(d)
     self.master.view_grideditor(
         grideditor.SetHeadersEditor(
             self.master,
             data,
             self.master.options.setter("setheaders")
         )
     )