openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #19376
Re: [Merge] lp:~googol/openlp/tests into lp:openlp
Review: Needs Information
96 + def get_html_tags_no_user_tags_test(self):
97 + """
98 + Test the get_html_tags static method.
99 + """
100 + with patch(u'openlp.core.lib.translate') as mocked_translate, \
101 + patch(u'openlp.core.lib.settings') as mocked_settings, \
102 + patch(u'openlp.core.lib.formattingtags.cPickle') as mocked_cPickle:
103 + # GIVEN: Our mocked modules and functions.
104 + mocked_translate.side_effect = lambda module, string_to_translate, comment: string_to_translate
105 + mocked_settings.value.return_value = u''
106 + mocked_cPickle.load.return_value = []
107 +
108 + # WHEN: Get the display tags.
109 + FormattingTags.load_tags()
110 + old_tags_list = FormattingTags.get_html_tags()
111 + FormattingTags.load_tags()
112 + new_tags_list = FormattingTags.get_html_tags()
113 +
114 + # THEN: Lists should be identically.
115 + assert old_tags_list == new_tags_list, u'The formatting tag lists should be identically.'
I'm not terribly sure what you're trying to do with this test, because I don't see how running the same function twice in a row is going to have any effect.
--
https://code.launchpad.net/~googol/openlp/tests/+merge/148748
Your team OpenLP Core is subscribed to branch lp:openlp.
Follow ups
References