web/test/unittest_magicsearch.py
changeset 3462 3a79fecdd2b4
parent 3369 7b88d12b4ee2
child 3469 1e28876c4b55
equal deleted inserted replaced
3461:8a11aeea4d25 3462:3a79fecdd2b4
    68         super(QSPreProcessorTC, self).setUp()
    68         super(QSPreProcessorTC, self).setUp()
    69         self.vreg.config.translations = {'en': (_translate, _ctxtranslate)}
    69         self.vreg.config.translations = {'en': (_translate, _ctxtranslate)}
    70         self.req = self.request()
    70         self.req = self.request()
    71         proc = self.vreg['components'].select('magicsearch', self.req)
    71         proc = self.vreg['components'].select('magicsearch', self.req)
    72         self.proc = [p for p in proc.processors if isinstance(p, QSPreProcessor)][0]
    72         self.proc = [p for p in proc.processors if isinstance(p, QSPreProcessor)][0]
    73         self.proc.req = self.req
    73         self.proc._cw = self.req
    74 
    74 
    75     def test_entity_translation(self):
    75     def test_entity_translation(self):
    76         """tests QSPreProcessor._get_entity_name()"""
    76         """tests QSPreProcessor._get_entity_name()"""
    77         translate = self.proc._get_entity_type
    77         translate = self.proc._get_entity_type
    78         self.assertEquals(translate(u'EmailAddress'), "EmailAddress")
    78         self.assertEquals(translate(u'EmailAddress'), "EmailAddress")