This repository has been archived on 2023-02-22. You can view files and clone it, but cannot push or open issues or pull requests.
passerelle-atreal-openads/tests
Michael Bideau 02f4a071fc Use HTTPResource, JSON schema for inputs, JSON lazy logging, added ForwardFile.attempt, and more
Features:
    * class AtrealOpenads now extends HTTPResource for HTTP Basic credentials
    * check_status is now also an endpoint (endpoint 'test_openads_connexion' deleted)
    * added JSON schema to validate POST request input (ouput schemas are defined too but unused for now)
    * added class 'LogJsonPayloadWithFileContent' to lazy log a json payload with content file filtered
    * added 'attempt' field to class 'ForwardFile' that count the attempt of uploading to openADS.API
    * added more controls over response data received

Refactoring:
    * removed the file content in function 'get_fwd_files_status()' and added content size instead
    * splitted the function 'get_fwd_files_status()' in two: one that retrieve detailed files, one only the summary
    * added function 'log_json_payload()' to help to log json payloads
    * added 2 functions to factorize the process of getting files from json payload
    * added function 'check_file_dict()' to factorize the process of checking a file dictionary

Fixes:
    * Default filename are now under 50 chars
    * Make the function 'get_fwd_files_status()' consistent in its return

Tests:
    * updated the test to reflect the use of HTTPResource and the split of 'get_fwd_files_status()'

More:
    * Added a lot of comments
    * Added endpoint anotation to validate response body, but its commented as the 'get' helper is not defined (not like the 'post' one)
2019-07-18 21:47:38 +02:00
..
resources Added testing with tox, added AGPLv3 license, replaced namespace, and more 2019-07-16 11:27:19 +02:00
__init__.py Added testing with tox, added AGPLv3 license, replaced namespace, and more 2019-07-16 11:27:19 +02:00
conftest.py Added testing with tox, added AGPLv3 license, replaced namespace, and more 2019-07-16 11:27:19 +02:00
settings.py Added testing with tox, added AGPLv3 license, replaced namespace, and more 2019-07-16 11:27:19 +02:00
test_atreal_openads.py Use HTTPResource, JSON schema for inputs, JSON lazy logging, added ForwardFile.attempt, and more 2019-07-18 21:47:38 +02:00