forked from openlp/openlp
PEP fixes
This commit is contained in:
parent
29bc21d807
commit
2dd770ea11
|
@ -232,14 +232,14 @@ class TestBibleImport(TestCase):
|
||||||
# called
|
# called
|
||||||
with patch.object(BibleImport, 'log_debug'), \
|
with patch.object(BibleImport, 'log_debug'), \
|
||||||
patch('openlp.plugins.bibles.lib.bibleimport.BiblesResourcesDB',
|
patch('openlp.plugins.bibles.lib.bibleimport.BiblesResourcesDB',
|
||||||
**{'get_book.return_value':{'id': 20}}):
|
**{'get_book.return_value': {'id': 20}}):
|
||||||
instance = BibleImport(MagicMock())
|
instance = BibleImport(MagicMock())
|
||||||
|
|
||||||
# WHEN: Calling get_book_ref_id_by_name
|
# WHEN: Calling get_book_ref_id_by_name
|
||||||
result = instance.get_book_ref_id_by_name('Gen', 66, 4)
|
result = instance.get_book_ref_id_by_name('Gen', 66, 4)
|
||||||
|
|
||||||
# THEN: The bible id should be returned
|
# THEN: The bible id should be returned
|
||||||
self.assertEqual(result,20)
|
self.assertEqual(result, 20)
|
||||||
|
|
||||||
def get_book_ref_id_by_name_get_alternative_book_name_test(self):
|
def get_book_ref_id_by_name_get_alternative_book_name_test(self):
|
||||||
"""
|
"""
|
||||||
|
@ -308,7 +308,7 @@ class TestBibleImport(TestCase):
|
||||||
patch('openlp.plugins.bibles.lib.bibleimport.AlternativeBookNamesDB',
|
patch('openlp.plugins.bibles.lib.bibleimport.AlternativeBookNamesDB',
|
||||||
**{'get_book_reference_id.return_value': None}) as mocked_alternative_book_names_db, \
|
**{'get_book_reference_id.return_value': None}) as mocked_alternative_book_names_db, \
|
||||||
patch('openlp.plugins.bibles.forms.BookNameForm',
|
patch('openlp.plugins.bibles.forms.BookNameForm',
|
||||||
return_value=MagicMock(**{'exec.return_value': QDialog.Accepted, 'book_id':50})):
|
return_value=MagicMock(**{'exec.return_value': QDialog.Accepted, 'book_id': 50})):
|
||||||
instance = BibleImport(MagicMock())
|
instance = BibleImport(MagicMock())
|
||||||
|
|
||||||
# WHEN: Calling get_book_ref_id_by_name
|
# WHEN: Calling get_book_ref_id_by_name
|
||||||
|
|
Loading…
Reference in New Issue