Пример #1
0
    def test_recv_failed(self):
        self.displayer_context.displayer.summary = mock.Mock(side_effect=ValueError("failed"))

        walker = FilterSummaryListWalker(
            self.original_walker, "summary 1")

        walker.recv("summary 1")
        self.assertEqual(len(walker), 1)
        self.assertTrue(self.error)
Пример #2
0
 def test_close(self):
     walker = FilterSummaryListWalker(
         self.original_walker, "summary 1")
     walker.close()
     self.displayer_context.store.unregister.assert_called_once_with(walker)
Пример #3
0
 def test_recv_with_not_match(self):
     walker = FilterSummaryListWalker(
         self.original_walker, "summary 1")
     walker.recv("summary")
     self.assertEqual(len(walker), 1)