Merge "Satisfy API Reference documentation deleting tags"
This commit is contained in:
commit
20ea7ab120
@ -549,6 +549,9 @@ class ResponseSerializer(wsgi.JSONResponseSerializer):
|
||||
def delete_properties(self, response, result):
|
||||
response.status_int = http.NO_CONTENT
|
||||
|
||||
def delete_tags(self, response, result):
|
||||
response.status_int = http.NO_CONTENT
|
||||
|
||||
def __render(self, json_data, response, response_status=None):
|
||||
body = jsonutils.dumps(json_data, ensure_ascii=False)
|
||||
response.unicode_body = six.text_type(body)
|
||||
|
@ -2064,3 +2064,16 @@ class TestMetadefsControllers(base.IsolatedUnitTest):
|
||||
self.tag_controller.update, request, tag,
|
||||
NAMESPACE4, TAG1)
|
||||
self.assertNotificationsLog([])
|
||||
|
||||
|
||||
class TestMetadefNamespaceResponseSerializers(base.IsolatedUnitTest):
|
||||
|
||||
def setUp(self):
|
||||
super(TestMetadefNamespaceResponseSerializers, self).setUp()
|
||||
self.serializer = namespaces.ResponseSerializer(schema={})
|
||||
self.response = mock.Mock()
|
||||
self.result = mock.Mock()
|
||||
|
||||
def test_delete_tags(self):
|
||||
self.serializer.delete_tags(self.response, self.result)
|
||||
self.assertEqual(204, self.response.status_int)
|
||||
|
Loading…
Reference in New Issue
Block a user