Ejemplo n.º 1
0
    def perform_short_q(self):

        short_q = BaseSimpleBookFinder(query='42')
        with self.assertRaises(search_errors.TooShortQuery) as e:
            short_q.check_query()
        exception_ = e.exception
        return short_q, exception_
Ejemplo n.º 2
0
    def test_empty_query(self):

        empty_q = BaseSimpleBookFinder()
        with self.assertRaises(search_errors.NoQuery):
            empty_q.check_query()

        empty_q2 = BaseSimpleBookFinder(query='')
        with self.assertRaises(search_errors.NoQuery):
            empty_q2.check_query()