equal
deleted
inserted
replaced
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") |