This commit is contained in:
Tim Bentley 2017-12-23 09:30:02 +00:00
parent 35d2ce263e
commit 560467757a
5 changed files with 7 additions and 7 deletions

View File

@ -78,7 +78,7 @@ class TestImageManager(TestCase, TestMixin):
byte_array = self.image_manager.get_image_bytes(full_path, 'church.jpg')
# THEN: Type should be a str.
assert isinstance(byte_array, str), 'The returned object should be a str'
assert isinstance(byte_array, str), 'The returned object should be a str'
# WHEN the image is retrieved has not been loaded
# THEN a KeyError is thrown

View File

@ -1124,7 +1124,7 @@ class TestMediaItem(TestCase, TestMixin):
# reselected
mocked_combo_box.clear.assert_called_once_with()
assert mocked_combo_box.addItem.call_args_list == \
[call('10', 10), call('11', 11), call('12', 12), call('13', 13)]
[call('10', 10), call('11', 11), call('12', 12), call('13', 13)]
mocked_combo_box.setCurrentIndex.assert_called_once_with(2)
def test_adjust_combo_box_restore_not_found(self):

View File

@ -228,7 +228,7 @@ class TestOpenSongImport(TestCase, TestMixin):
# THEN: find_and_create_book and process_books should be called with the details from the mocked books
assert self.mocked_find_and_create_book.call_args_list == [call('Name1', 2, 10), call('Name2', 2, 10)]
assert mocked_process_chapters.call_args_list == \
[call('db_book1', 'Chapter1'), call('db_book2', 'Chapter2')]
[call('db_book1', 'Chapter1'), call('db_book2', 'Chapter2')]
assert importer.session.commit.call_count == 2
def test_process_chapters_stop_import(self):
@ -274,7 +274,7 @@ class TestOpenSongImport(TestCase, TestMixin):
# THEN: parse_chapter_number, process_verses and increment_process_bar should have been called
assert mocked_parse_chapter_number.call_args_list == [call('1', 0), call('2', 1)]
assert importer.process_verses.call_args_list == \
[call(book, 1, ['Chapter1 Verses']), call(book, 2, ['Chapter2 Verses'])]
[call(book, 1, ['Chapter1 Verses']), call(book, 2, ['Chapter2 Verses'])]
assert importer.wizard.increment_progress_bar.call_args_list == [call('Importing Book 1...'),
call('Importing Book 2...')]
@ -325,7 +325,7 @@ class TestOpenSongImport(TestCase, TestMixin):
assert mocked_parse_verse_number.call_args_list == [call('1', 0), call('2', 1)]
assert mocked_get_text.call_args_list == [call(verse1), call(verse2)]
assert importer.create_verse.call_args_list == \
[call(1, 1, 1, 'Verse1 Text'), call(1, 1, 2, 'Verse2 Text')]
[call(1, 1, 1, 'Verse1 Text'), call(1, 1, 2, 'Verse2 Text')]
def test_do_import_parse_xml_fails(self):
"""

View File

@ -156,7 +156,7 @@ class TestPowerpointDocument(TestCase, TestMixin):
result = doc.is_loaded()
# THEN: result should be true
assert result == True, 'The result should be True'
assert result is True, 'The result should be True'
else:
self.skipTest('Powerpoint not available, skipping test.')

View File

@ -71,5 +71,5 @@ class TestOpenLPImport(TestCase):
# THEN: do_import should return none and the progress bar maximum should not be set.
assert importer.do_import() is None, 'do_import should return None when import_source is not a list'
assert mocked_import_wizard.progress_bar.setMaximum.called == False, \
assert mocked_import_wizard.progress_bar.setMaximum.called is False, \
'setMaximum on import_wizard.progress_bar should not have been called'