Changes exception raised by v3.trusts.update()

The client should raise a Client error, instead of
a Server one.

The MethodNotImplemented exeception handles calls
made to not supported methods.

Change-Id: I0e2a8c5e1e53b0f17b886aa693c922bc193bb882
Closes-Bug: #1325755
This commit is contained in:
Rodrigo Duarte Sousa
2014-06-02 18:44:59 -03:00
parent df032ebe77
commit 53a175e7c6
2 changed files with 3 additions and 2 deletions

View File

@@ -105,4 +105,4 @@ class TrustTests(utils.TestCase, utils.CrudTests):
def test_update(self): def test_update(self):
# Update not supported for the OS-TRUST API # Update not supported for the OS-TRUST API
self.assertRaises(exceptions.HttpNotImplemented, self.manager.update) self.assertRaises(exceptions.MethodNotImplemented, self.manager.update)

View File

@@ -74,7 +74,8 @@ class TrustManager(base.CrudManager):
**kwargs) **kwargs)
def update(self): def update(self):
raise exceptions.HttpNotImplemented("Update not supported for trusts") raise exceptions.MethodNotImplemented('Update not supported'
' for trusts')
def list(self, trustee_user=None, trustor_user=None, **kwargs): def list(self, trustee_user=None, trustor_user=None, **kwargs):
"""List Trusts.""" """List Trusts."""