forked from openlp/openlp
Test fixes
This commit is contained in:
parent
a75790d699
commit
d6afa49055
@ -173,12 +173,16 @@ class TestMediaItem(TestCase, TestMixin):
|
|||||||
author3.display_name = "Max Mustermann"
|
author3.display_name = "Max Mustermann"
|
||||||
song.authors.append(author3)
|
song.authors.append(author3)
|
||||||
authors_str = "Hans Wurst, Max Mustermann, Max Mustermann"
|
authors_str = "Hans Wurst, Max Mustermann, Max Mustermann"
|
||||||
authors_str_wrong = "Hans Wurst, Max Mustermann"
|
|
||||||
|
|
||||||
# WHEN: Checking for matching
|
# WHEN: Checking for matching
|
||||||
correct_result = self.media_item._authors_match(song, authors_str)
|
result = self.media_item._authors_match(song, authors_str)
|
||||||
wrong_result = self.media_item._authors_match(song, authors_str_wrong)
|
|
||||||
|
|
||||||
# THEN: They should match
|
# THEN: They should match
|
||||||
self.assertTrue(correct_result)
|
self.assertTrue(result, "Authors should match")
|
||||||
self.assertFalse(wrong_result)
|
|
||||||
|
# WHEN: An author is missing in the string
|
||||||
|
authors_str = "Hans Wurst, Max Mustermann"
|
||||||
|
result = self.media_item._authors_match(song, authors_str)
|
||||||
|
|
||||||
|
# THEN: They should not match
|
||||||
|
self.assertFalse(result, "Authors should not match")
|
||||||
|
Loading…
Reference in New Issue
Block a user