tests.integration package¶
Submodules¶
tests.integration.post_cars_call_test module¶
POST Call Integration Test
-
class
tests.integration.post_cars_call_test.
PostCarsCallTestCase
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Testing a JSON API implemented in Flask. POST Call Integration Test.
The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. It essentially means that POST request-URI should be of a collection URI.
POST is NOT idempotent. So if you retry the request N times, you will end up having N resources with N different URIs created on server.
Use POST when you want to add a child resource under resources collection.
tests.integration.post_register_call_test module¶
POST Call Integration Test
-
class
tests.integration.post_register_call_test.
PostCarRegistrationCallTestCase
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Testing a JSON API implemented in Flask. POST Call Integration Test.
The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. It essentially means that POST request-URI should be of a collection URI.
POST is NOT idempotent. So if you retry the request N times, you will end up having N resources with N different URIs created on server.
Use POST when you want to add a child resource under resources collection.
tests.integration.put_cars_call_test module¶
PUT Call Integration Test
-
class
tests.integration.put_cars_call_test.
PutCarsCallTestCase
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Testing a JSON API implemented in Flask. PUT Call Integration Test.
PUT method requests for the enclosed entity be stored under the supplied Request-URI. If the Request-URI refers to an already existing resource – an update operation will happen, otherwise create operation should happen if Request-URI is a valid resource URI (assuming client is allowed to determine resource identifier).
PUT method is idempotent. So if you send retry a request multiple times, that should be equivalent to single request modification.
Use PUT when you want to modify a singular resource which is already a part of resources collection. PUT replaces the resource in its entirety.