~ubuntuone-control-tower/ubuntuone-storage-protocol/stable-1-6

« back to all changes in this revision

Viewing changes to tests/test_request.py

  • Committer: Tarmac
  • Author(s): Rodney Dawes
  • Date: 2010-11-16 15:10:48 UTC
  • mfrom: (121.1.4 use-packages)
  • Revision ID: tarmac-20101116151048-b0e20j7lorb4yhe1
Switch to using packaged mocker and ubuntuone-dev-tools
Use pyflakes with u1lint and also run pep8
Fix a lot of pylint/pyflakes/pep8 errors

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
from ubuntuone.storageprotocol import errors, protocol_pb2
31
31
from ubuntuone.storageprotocol.request import (
32
 
    RequestHandler, Request, RequestResponse
33
 
)
 
32
    RequestHandler, Request, RequestResponse)
34
33
 
35
34
# let's not get picky about attributes outside __init__ in tests
36
 
# pylint: disable-msg=W0201
37
35
# pylint: disable=W0201
38
36
 
39
37
 
99
97
        try:
100
98
            yield self.request.deferred
101
99
        except OurException:
102
 
            pass # passed
 
100
            pass  # passed
103
101
        else:
104
102
            self.fail("Expected to fail with the correct reason.")
105
103
 
158
156
        comment = 'No more bytes for you.'
159
157
        free_space_info = {'share_id': str(uuid.uuid4()), 'free_bytes': 0}
160
158
        self.request.id = 1
 
159
 
161
160
        def check(message):
162
161
            """Check the message"""
163
162
            self.assertEqual(message.id, self.request.id)