Use 201 insted of 200 in PUT test case

There are some unit test cases which assumes 200 as the response
of PUT request, but 200 is never returned in PUT.
This patch replaces 200 in PUT by 201, and adapt unit test cases
to real case.

Change-Id: I35fc7a4fe7fcc5558a9e6c6371105793c2710f3e
This commit is contained in:
Takashi Kajinami 2016-02-22 16:10:09 +09:00
parent 5b18455cef
commit 406e8996fb
2 changed files with 32 additions and 32 deletions

View File

@ -261,12 +261,12 @@ class TestAccountController(unittest.TestCase):
def test_response_code_for_PUT(self):
PUT_TEST_CASES = [
((200, 200, 200), 200),
((200, 200, 404), 200),
((200, 200, 503), 200),
((200, 404, 404), 404),
((200, 404, 503), 503),
((200, 503, 503), 503),
((201, 201, 201), 201),
((201, 201, 404), 201),
((201, 201, 503), 201),
((201, 404, 404), 404),
((201, 404, 503), 503),
((201, 503, 503), 503),
((404, 404, 404), 404),
((404, 404, 503), 404),
((404, 503, 503), 503),
@ -317,16 +317,16 @@ class TestAccountController4Replicas(TestAccountController):
def test_response_code_for_PUT(self):
PUT_TEST_CASES = [
((200, 200, 200, 200), 200),
((200, 200, 200, 404), 200),
((200, 200, 200, 503), 200),
((200, 200, 404, 404), 503),
((200, 200, 404, 503), 503),
((200, 200, 503, 503), 503),
((200, 404, 404, 404), 404),
((200, 404, 404, 503), 503),
((200, 404, 503, 503), 503),
((200, 503, 503, 503), 503),
((201, 201, 201, 201), 201),
((201, 201, 201, 404), 201),
((201, 201, 201, 503), 201),
((201, 201, 404, 404), 503),
((201, 201, 404, 503), 503),
((201, 201, 503, 503), 503),
((201, 404, 404, 404), 404),
((201, 404, 404, 503), 503),
((201, 404, 503, 503), 503),
((201, 503, 503, 503), 503),
((404, 404, 404, 404), 404),
((404, 404, 404, 503), 404),
((404, 404, 503, 503), 503),

View File

@ -219,12 +219,12 @@ class TestContainerController(TestRingBase):
def test_response_code_for_PUT(self):
PUT_TEST_CASES = [
((200, 200, 200), 200),
((200, 200, 404), 200),
((200, 200, 503), 200),
((200, 404, 404), 404),
((200, 404, 503), 503),
((200, 503, 503), 503),
((201, 201, 201), 201),
((201, 201, 404), 201),
((201, 201, 503), 201),
((201, 404, 404), 404),
((201, 404, 503), 503),
((201, 503, 503), 503),
((404, 404, 404), 404),
((404, 404, 503), 404),
((404, 503, 503), 503),
@ -304,16 +304,16 @@ class TestContainerController4Replicas(TestContainerController):
def test_response_code_for_PUT(self):
PUT_TEST_CASES = [
((200, 200, 200, 200), 200),
((200, 200, 200, 404), 200),
((200, 200, 200, 503), 200),
((200, 200, 404, 404), 503),
((200, 200, 404, 503), 503),
((200, 200, 503, 503), 503),
((200, 404, 404, 404), 404),
((200, 404, 404, 503), 503),
((200, 404, 503, 503), 503),
((200, 503, 503, 503), 503),
((201, 201, 201, 201), 201),
((201, 201, 201, 404), 201),
((201, 201, 201, 503), 201),
((201, 201, 404, 404), 503),
((201, 201, 404, 503), 503),
((201, 201, 503, 503), 503),
((201, 404, 404, 404), 404),
((201, 404, 404, 503), 503),
((201, 404, 503, 503), 503),
((201, 503, 503, 503), 503),
((404, 404, 404, 404), 404),
((404, 404, 404, 503), 404),
((404, 404, 503, 503), 503),