From d6afa4905556febbc49d1ce51e02697e3c7e4eea Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Tue, 13 May 2014 19:52:08 +0200 Subject: [PATCH] Test fixes --- .../openlp_plugins/songs/test_mediaitem.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/functional/openlp_plugins/songs/test_mediaitem.py b/tests/functional/openlp_plugins/songs/test_mediaitem.py index 1b4374bcd..b3c097268 100644 --- a/tests/functional/openlp_plugins/songs/test_mediaitem.py +++ b/tests/functional/openlp_plugins/songs/test_mediaitem.py @@ -173,12 +173,16 @@ class TestMediaItem(TestCase, TestMixin): author3.display_name = "Max Mustermann" song.authors.append(author3) authors_str = "Hans Wurst, Max Mustermann, Max Mustermann" - authors_str_wrong = "Hans Wurst, Max Mustermann" # WHEN: Checking for matching - correct_result = self.media_item._authors_match(song, authors_str) - wrong_result = self.media_item._authors_match(song, authors_str_wrong) + result = self.media_item._authors_match(song, authors_str) # THEN: They should match - self.assertTrue(correct_result) - self.assertFalse(wrong_result) + self.assertTrue(result, "Authors should match") + + # 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")