softlayer / jumpgate

A simple library to make more clouds compatible with OpenStack.
http://softlayer.github.io/jumpgate/
MIT License
46 stars 29 forks source link

Adds openstack's hacking library to tests #119

Closed sudorandom closed 10 years ago

sudorandom commented 10 years ago
sudorandom commented 10 years ago

This is going to rely on the commits in #120 for the networking-related code that's currently failing the style checks.

sudorandom commented 10 years ago

This currently doesn't cover the tests. That will come in a later pull request. That one will include some logical fixes as well. For example: https://github.com/softlayer/jumpgate/commit/1956852f71e526279732eb77b76a035d46846ed2#diff-297394d38648923490c04cf2908dbca6R64

The code: self.assertRaises(ExceptionType) will actually return a context for use with the with keyword so code like this is possible:

with self.assertRaises(Exception):
    this_raises_an_exception()

With the code I linked, the self.assertRaises() call is essentially no-op so that test doesn't do what you'd expect.

ajiang38740 commented 10 years ago

Looks good to me.