← Back to team overview

openlp-core team mailing list archive

Re: [Merge] lp:~raoul-snyman/openlp/bug-1411433 into lp:openlp

 

On Tue, Mar 10, 2015 at 2:58 PM, Tim Bentley <tim.bentley@xxxxxxxxx> wrote:
<snip[>
>> +
>> +    @patch(u'openlp.plugins.media.mediaplugin.Plugin.initialise')
>> +    @patch(u'openlp.plugins.media.mediaplugin.Settings')
>> +    def initialise_test(self, MockedSettings, mocked_initialise):
>
> Arn't these the wrong way round.
>
<snip>

No - first line goes to first var, second line goes to second var, ...

>From https://docs.python.org/3/library/unittest.mock.html

from unittest.mock import patch
... @patch('module.ClassName2')
... @patch('module.ClassName1')
... def test(MockClass1, MockClass2):

Registered Linux user 296561
Slackin' since 1993
Slackware Linux (http://www.slackware.com)

-- 
https://code.launchpad.net/~raoul-snyman/openlp/bug-1411433/+merge/252517
Your team OpenLP Core is requested to review the proposed merge of lp:~raoul-snyman/openlp/bug-1411433 into lp:openlp.


References