def test_get_label_url(self): self.assertEquals(util.get_label_url('foo'), '/Label%3Afoo') self.assertEquals(util.get_label_url('foo bar'), '/Label%3Afoo_bar') self.assertEquals(util.get_label_url('foo, bar'), '/Label%3Afoo%2C_bar') self.assertEquals(util.get_label_url(u'тест'), '/Label%3A%D1%82%D0%B5%D1%81%D1%82')
def labelurl(value): return util.get_label_url(value)