~rackspace-titan/glance/glance-clear-lp766295

Viewing all changes in revision 117.

  • Committer: Tarmac
  • Author(s): Eldar Nugaev
  • Date: 2011-04-19 16:32:41 UTC
  • mfrom: (113.1.1 trunk)
  • Revision ID: tarmac-20110419163241-00lnkrp38u8iohaw
Fixing tests.
Sorry for late response. 

Rick Harris wrote on 2011-04-12
Really nice job, Eldar.

> 46 +        image_swift = StringIO.StringIO("nevergonnamakeit")
> 47 +        options = SWIFT_OPTIONS.copy()
> 48 +        del options['swift_store_user']
> 49 +        self.assertRaises(BackendException,
> 50 +                          SwiftBackend.add,
> 51 +                          2, image_swift, options)

Might be better to DRY up the code some by adding a helper-method, like:

def assertOptionRequiredForSwift(self, key):
  image_swift = StringIO.StringIO("nevergonnamakeit")
  options = SWIFT_OPTIONS.copy()
  del options[key]
  self.assertRaises(BackendException,
    SwiftBackend.add,
    2, image_swift, options)

Marking as Needs Fixing, but if you don't like the idea, I'd be willing to set this as Approved (since the suggestion is so minor :-)

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: