def test_get_online_chapter(self):
        bible = WebExtractor()
        options = self.get_alternative_interface_options()
        for option in options:
            bible.translation = option['translation']
            bible.show_passage_numbers = option['show_passage_numbers']

            text1 = bible.search('Daniel 5')
            text2 = bible.get_chapter('Daniel', 5)
            self.assertEqual(text1, text2, 'Passage is incorrect')
    def test_get_online_passages(self):
        bible = WebExtractor()
        options = self.get_alternative_interface_options()
        for option in options:
            bible.translation = option['translation']
            bible.show_passage_numbers = option['show_passage_numbers']

            text1 = bible.search('Ezekiel 40:19-20')
            text2 = bible.get_passages('Ezekiel', 40, 19, 20)
            self.assertEqual(text1, text2, 'Passage is incorrect')
    def test_get_online_passage(self):
        bible = WebExtractor()
        options = self.get_alternative_interface_options()
        for option in options:
            bible.translation = option['translation']
            bible.show_passage_numbers = option['show_passage_numbers']

            text1 = bible.search('Ecclesiastes 1:17')
            text2 = bible.get_passage('Ecclesiastes', 1, 17)
            self.assertEqual(text1, text2, 'Passage is incorrect')
    def test_get_online_book(self):
        bible = WebExtractor()
        options = self.get_alternative_interface_options()
        for option in options:
            bible.translation = option['translation']
            bible.show_passage_numbers = option['show_passage_numbers']

            text1 = bible.get_chapters('2 Thessalonians', 1, 3)
            text2 = bible.get_book('2 Thessalonians')
            # A book should be the same ass getting all the chapters in a given book
            self.assertEqual(text1, text2, 'Passage is incorrect')
    def test_get_online_passage_range(self):
        bible = WebExtractor()
        options = self.get_alternative_interface_options()
        for option in options:
            bible.translation = option['translation']
            bible.show_passage_numbers = option['show_passage_numbers']

            text1 = bible.get_passage(
                'Amos', 8, 14) + '\n' + bible.get_passage('Amos', 9, 1)
            text2 = bible.get_passage_range('Amos', 8, 14, 9, 1)
            # A passage range should be the same as putting all the passage together with newline separators
            self.assertEqual(text1, text2, 'Passage is incorrect')
    def test_get_online_chapters(self):
        bible = WebExtractor()
        options = self.get_alternative_interface_options()
        for option in options:
            bible.translation = option['translation']
            bible.show_passage_numbers = option['show_passage_numbers']

            text1 = bible.get_chapter('Amos', 8) + '\n' + bible.get_chapter(
                'Amos', 9)
            text2 = bible.get_chapters('Amos', 8, 9)
            # Chapters interface should be the same as requesting the individual chapters with newline separators
            self.assertEqual(text1, text2, 'Passage is incorrect')