示例#1
0
 def setUp(self):
     global pre, post
     self.presenter = ReportPresenter()
     self.asylum = Reports.get_asylum_report()
     pre = post = self
     self.polis_msgs = self.asylum['Polis'][0]['msgs']
     self.msgs = [MsgModel({u'date': u' 24 de Octubre de 2013, 08:22:36 am \xbb'}),
                  MsgModel({u'date': u' 24 de Octubre de 2012, 08:22:36 am \xbb'})]
     self.thread_mock = mock()
     when(self.thread_mock).msgs_objs().thenReturn(self.msgs)
示例#2
0
 def test_when_filtering_without_filter_result_is_teh_same(self):
     self.filtering.filter_report(self.asylum_report_query, self.asylum_report)
     expected = transtale_report_into_threads(Reports.asylum_report_request, Reports.get_asylum_report())
     self.assertEqual(self.asylum_report.count_entries_in('Polis'), expected.count_entries_in('Polis'))
示例#3
0
 def setUp(self):
     global pre, post
     self.presenter = ReportPresenter()
     self.asylum = Reports.get_asylum_report()
     pre = post = self
     self.polis_msgs = self.asylum['Polis'][0]['msgs']
示例#4
0
 def setUp(self):
     self.filtering = FilteringService()
     self.asylum_report = transtale_report_into_threads(Reports.asylum_report_request, Reports.get_asylum_report())
     self.asylum_report_query = ReportQueryModel(Reports.asylum_report_request)