Announcement_Service/gen/openapi_server/test/test_default_controller.py

63 lines
1.7 KiB
Python

import unittest
from flask import json
from openapi_server.models.patch_notes import PatchNotes # noqa: E501
from openapi_server.test import BaseTestCase
class TestDefaultController(BaseTestCase):
"""DefaultController integration test stubs"""
def test_get_patchnotes(self):
"""Test case for get_patchnotes
"""
headers = {
'Accept': 'application/json',
}
response = self.client.open(
'/patchnotes',
method='GET',
headers=headers)
self.assert200(response,
'Response body is : ' + response.data.decode('utf-8'))
def test_patch_note_delete(self):
"""Test case for patch_note_delete
"""
headers = {
}
response = self.client.open(
'/patchnotes/{patch_id}'.format(patch_id='patch_id_example'),
method='DELETE',
headers=headers)
self.assert200(response,
'Response body is : ' + response.data.decode('utf-8'))
def test_post_patchnotes(self):
"""Test case for post_patchnotes
"""
patch_notes = openapi_server.PatchNotes()
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json',
}
response = self.client.open(
'/patchnotes',
method='POST',
headers=headers,
data=json.dumps(patch_notes),
content_type='application/json')
self.assert200(response,
'Response body is : ' + response.data.decode('utf-8'))
if __name__ == '__main__':
unittest.main()