Merge lp:~alisonken1/openlp/bug-1407445 into lp:openlp
Proposed by
Ken Roberts
Status: | Superseded |
---|---|
Proposed branch: | lp:~alisonken1/openlp/bug-1407445 |
Merge into: | lp:openlp |
Diff against target: |
94 lines (+45/-2) 3 files modified
openlp/core/ui/servicemanager.py (+2/-0) openlp/plugins/remotes/lib/httprouter.py (+1/-1) tests/functional/openlp_plugins/remotes/test_router.py (+42/-1) |
To merge this branch: | bzr merge lp:~alisonken1/openlp/bug-1407445 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tim Bentley | Needs Information | ||
Review via email: mp+245894@code.launchpad.net |
This proposal has been superseded by a proposal from 2015-01-08.
Description of the change
bugfix 1407445
Fix remote previous/next calls to servicemananger
lp:~alisonken1/openlp/bug-1407445 (revision 2469)
[SUCCESS] http://
[SUCCESS] http://
[SUCCESS] http://
[FAILURE] http://
Stopping after failure
passed local nosetest
passed local pep8
To post a comment you must log in.
I had refactored the setup - on first try ).get(' service_ manager' ) returned None.
Registry(
Fixed.
On Thu, Jan 8, 2015 at 10:46 AM, Tim Bentley <email address hidden> wrote: core/ui/ servicemanager. py' core/ui/ servicemanager. py 2014-12-31 10:58:13 +0000 core/ui/ servicemanager. py 2015-01-08 18:35:24 +0000 QObject. connect( self, QtCore. SIGNAL( 'servicemanager _set_item' ), self.on_set_item) QObject. connect( self, QtCore. SIGNAL( 'servicemanager _next_item' ), self.next_item) QObject. connect( self, QtCore. SIGNAL( 'servicemanager _previous_ item'), self.previous_item) post_set_ up(self) : plugins/ remotes/ lib/httprouter. py' plugins/ remotes/ lib/httprouter. py 2014-12-31 10:58:13 +0000 plugins/ remotes/ lib/httprouter. py 2015-01-08 18:35:24 +0000 http_error( ) manager. emit(QtCore. SIGNAL( event), data) ).execute( event) manager. emit(QtCore. SIGNAL( event)) json_header( ) {'results' : {'success': True}}).encode() functional/ openlp_ plugins/ remotes/ test_router. py' l/openlp_ plugins/ remotes/ test_router. py 2014-12-31 10:58:13 +0000 l/openlp_ plugins/ remotes/ test_router. py 2015-01-08 18:35:24 +0000 plugins. remotes. lib.httpserver import HttpRouter application( ) settings( ) ).extend_ default_ settings( __default_ settings_ _) manager = ServiceManager() manager = Registry( ).service_ list['service_ manager' ] = self.service_ manager image_manager. assert_ called_ any(os. path.normpath( 'thumbnails\ \another test'), image_manager. assert_ called_ any(os. path.normpath( 'thumbnails\ \another test'), 'slide1.png', '120x90') next_test( self):
> Review: Needs Information
>
>
>
> Diff comments:
>
>> === modified file 'openlp/
>> --- openlp/
>> +++ openlp/
>> @@ -338,6 +338,8 @@
>> self.setup_ui(self)
>> # Need to use event as called across threads and UI is updated
>> QtCore.
>> + QtCore.
>> + QtCore.
>>
>> def bootstrap_
>> """
>>
>> === modified file 'openlp/
>> --- openlp/
>> +++ openlp/
>> @@ -582,7 +582,7 @@
>> return self.do_
>> self.service_
>> else:
>> - Registry(
>> + self.service_
>> self.do_
>> return json.dumps(
>>
>>
>> === modified file 'tests/
>> --- tests/functiona
>> +++ tests/functiona
>> @@ -32,8 +32,9 @@
>> import os
>> import urllib.request
>> from unittest import TestCase
>> -
>> +from PyQt4 import QtCore
>> from openlp.core.common import Settings, Registry
>> +from openlp.core.ui import ServiceManager
>> from openlp.
>> from urllib.parse import urlparse
>> from tests.functional import MagicMock, patch, mock_open
>> @@ -61,9 +62,12 @@
>> """
>> Create the UI
>> """
>> + Registry.create()
>> self.setup_
>> self.build_
>> Settings(
>> + self.service_
>> + self.service_
>
> Why do you need this the previous line should have created and registered a valid servicemanager object.
>
>> self.router = HttpRouter()
>>
>> def tearDown(self):
>> @@ -299,3 +303,41 @@
>> mocked_
>> 'slide1.png', None, '120x90')
>> mocked_
>> +
>> + def remote_
>> + """
>> + Test service manager receives remote next click p...