Esempio n. 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, "/")
Esempio n. 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, "/")
Esempio n. 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("/")
Esempio n. 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("/")
Esempio n. 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")))
Esempio n. 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")
         )
     )