Merge lp:~diegosarmentero/ubuntu-sso-client/main-moved into lp:ubuntu-sso-client
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Roberto Alsina on 2012-03-25 | ||||
| Approved revision: | 938 | ||||
| Merged at revision: | 933 | ||||
| Proposed branch: | lp:~diegosarmentero/ubuntu-sso-client/main-moved | ||||
| Merge into: | lp:ubuntu-sso-client | ||||
| Diff against target: |
282 lines (+160/-20) 7 files modified
bin/ubuntu-sso-login-qt (+3/-4) run-tests (+1/-1) ubuntu_sso/qt/main/__init__.py (+16/-5) ubuntu_sso/qt/main/linux.py (+35/-0) ubuntu_sso/qt/main/tests/__init__.py (+17/-0) ubuntu_sso/qt/main/tests/test_main.py (+42/-10) ubuntu_sso/qt/main/windows.py (+46/-0) |
||||
| To merge this branch: | bzr merge lp:~diegosarmentero/ubuntu-sso-client/main-moved | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Natalia Bidart | 2012-03-21 | Approve on 2012-03-23 | |
|
Review via email:
|
|||
Commit Message
- Fixed the backend getting stuck installing the qtreactor before the qt process is executed and running the application in the twisted process. (This fix affects only Windows OS)
- 933. By Diego Sarmentero on 2012-03-21
-
Installing qtreactor
- 934. By Diego Sarmentero on 2012-03-21
-
main updated
- 935. By Diego Sarmentero on 2012-03-21
-
Linking bug number.
- 936. By Diego Sarmentero on 2012-03-22
-
Fixing tests.
- 937. By Diego Sarmentero on 2012-03-22
-
Adding a python to ignore during gtk tests
| Natalia Bidart (nataliabidart) wrote : | # |
The refactored test is not testing that the proper methods were called, since, having this list:
expected = [((FakeApplicat
((), kwargs), ((FakeApplicati
how can you tell that the first item ((FakeApplicati
In my proposal the name of the method is added to the 'called' list, so you can ensure the desired methods were called when needed and in the right order.
On the other hand, I liked how you solved the close_callback issue :-).
- 938. By Diego Sarmentero on 2012-03-23
-
fixing tests.

* By popping the 'close_callback' param, you're no longer testing that the proper close_callback is passed to the GUI. Can you please restore that?
* Is better to have self.called to be a list so you can test that a given method (and only a given method) was called.
* These two tests have a lot of code duplication:
def test_main_ source_ main(self) : source_ main_start( self):
def test_main_
You could improve all the above by doing something like:
class BasicTestCase( TestCase) :
"""Test case with a helper tracker."""
@defer. inlineCallbacks Case, self).setUp()
def setUp(self):
yield super(BasicTest
self.called = []
def called_ui(**kw):
"" "record ui call."""
kw. pop('close_ callback' )
self. called[ 'called_ ui'] = ('GUI', kw)
return FakeUi()
def test_main(self): name='APP_ NAME', foo='foo', bar='bar',
baz= 'yadda' , yadda=0)
main.main( **kwargs)
"""Calling main.main() a UI instance is created."""
kwargs = dict(app_
and thus you can safely remove:
def test_main_ source_ main(self) : source_ main_start( self):
def test_main_
* You're adding old copyright notices (new files say 2011 or 2011-2012, they should be only 2012).