예제 #1
0
class WikiIndexerSilenceOnExceptionTestCase(BaseBloodhoundSearchTest):
    def setUp(self):
        super(WikiIndexerSilenceOnExceptionTestCase, self).setUp()
        self.env.config.set('bhsearch', 'silence_on_error', "True")
        self.wiki_indexer = WikiIndexer(self.env)

    def tearDown(self):
        pass

    def test_does_not_raise_exception_on_add(self):
        self.wiki_indexer.wiki_page_added(None)

    def test_raise_exception_if_configured(self):
        self.env.config.set('bhsearch', 'silence_on_error', "False")
        self.assertRaises(Exception, self.wiki_indexer.wiki_page_added, None)
예제 #2
0
class WikiIndexerSilenceOnExceptionTestCase(BaseBloodhoundSearchTest):
    def setUp(self):
        super(WikiIndexerSilenceOnExceptionTestCase, self).setUp()
        self.env.config.set('bhsearch', 'silence_on_error', "True")
        self.wiki_indexer = WikiIndexer(self.env)

    def tearDown(self):
        pass

    def test_does_not_raise_exception_on_add(self):
        self.wiki_indexer.wiki_page_added(None)

    def test_raise_exception_if_configured(self):
        self.env.config.set('bhsearch', 'silence_on_error', "False")
        self.assertRaises(
            Exception,
            self.wiki_indexer.wiki_page_added,
            None)
예제 #3
0
 def setUp(self):
     super(WikiIndexerSilenceOnExceptionTestCase, self).setUp()
     self.env.config.set('bhsearch', 'silence_on_error', "True")
     self.wiki_indexer = WikiIndexer(self.env)