~mvo/ubuntu-sso-client/strawman-lp711413

« back to all changes in this revision

Viewing changes to ubuntu_sso/utils/webclient/tests/test_webclient.py

  • Committer: Tarmac
  • Author(s): Diego Sarmentero, Roberto Alsina, Natalia B. Bidart, manuel.delapena at canonical, Manuel de la Pena
  • Date: 2012-03-27 19:33:27 UTC
  • mfrom: (831.1.2 stable-3-0-update-2.99.91.1)
  • Revision ID: tarmac-20120327193327-rgwi1z1cbfxxrx9d
Tags: release-2_99_91_1
[ Diego Sarmentero <diego.sarmentero@canonical.com> ]
  - Converting to unicode some data returned by webclient in
    QByteArray format (LP: #961315).
  - Adding ubuntu_sso.qt.main module to the setup script (LP: #965377).
  - 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) (LP: #961511).

[ Roberto Alsina <roberto.alsina@canonical.com> ]
   - Forced white background (LP: #961346).

[ Manuel de la Pena <manuel.delapena@canonical.com> ]
  - Fixed dialog on window by using show so that the QEventLoop does
    not block the execution of the main loop of the reactor which did
    not allow the deferreds to be fired (LP: #960481).

Show diffs side-by-side

added added

removed removed

Lines of Context:
373
373
        self.assertTrue(isinstance(result.content, bytes),
374
374
                        "The type of %r must be bytes" % result.content)
375
375
 
 
376
    @defer.inlineCallbacks
 
377
    def test_webclienterror_not_string(self):
 
378
        """The returned exception contains unicode data."""
 
379
        deferred = self.wc.request(self.base_iri + THROWERROR)
 
380
        failure = yield self.assertFailure(deferred, webclient.WebClientError)
 
381
        for error in failure.args:
 
382
            self.assertTrue(isinstance(error, basestring))
 
383
 
376
384
 
377
385
class FakeSavingReactor(object):
378
386
    """A fake reactor that saves connection attempts."""