Commit Graph

14 Commits

Author SHA1 Message Date
Thomas NOËL 7897daaf49 add Jenkinsfile 2019-07-15 16:49:19 +02:00
Michael Bideau ee0173698e Added 'test_openads_connexion' endpoint and README completed 2019-07-11 18:57:07 +02:00
Michael Bideau 522634d564 Added 'extra_debug' field and a function to only log debug message if extra_debug is enabled 2019-07-11 18:22:47 +02:00
Michael Bideau 7020d3c2d0 Cleanup: removed useless endpoints and test cases 2019-07-11 17:41:38 +02:00
Michael Bideau 6fe6307506 Tests: removed useless files added by mistake and old 'tests' directory 2019-07-11 17:18:08 +02:00
Michael Bideau 1ac8c2f14e Making tests independant of 'passerelle' and 'vagrant', added HTTP Basic credentials
Tests:
    * moved 'tests' folder inside 'atreal_openads' module
    * removed useless settings.py file
    * removed useless imports
    * added test file 'resources'
    * fixed file path (no more vagrant)
    * updated the test case of 'upload2ForwardFile' to test for 'plan' type_fichier
    * added HTTP Basic credentials to 'atreal_openads' fixture (removed 'token')

Fixes:
    * stop guessing ForwardFile.type_fichier based on file path
2019-07-11 17:07:41 +02:00
Michael Bideau 88fa11457c Added minimum required files for packaging 2019-07-10 18:30:18 +02:00
Michael Bideau f47be6b7c8 Merge branch 'master' of ssh://git.entrouvert.org/passerelle-atreal-openads 2019-07-10 18:27:22 +02:00
Michael Bideau ce44b0a733 Added HTTP Basic authentication, ForwardFiles content deleted on success, plus logging and cleaning
Features:
    * added HTTP Basic authentication (+ login/password fields, - token field)
    * ForwardFiles content deleted on upload success (object/status kept)

Logging:
    * added debuging and warning messages
    * replaced the python interpolation '%' by function args ','

Cleaning:
    * removed functions 'ajob', 'afile'
    * removed unused imports

Fixes:
    * function 'get_upload_path()' returns unique names
    * added missing imports
    * using string in dictionary keys
2019-07-10 18:23:31 +02:00
Michael Bideau 58608886aa Added HTTP Basic authentication, more logging, cleaning, some small fix
Feature:
    * added two new connector fields to store HTTP Basic credentials
    * removed one connector field that stored the HTTP auth token

Logging:
    * added debuging and warning messages
    * replaced the python interpolation '%' by function args ','

Cleaning:
    * removed functions 'ajob', 'afile'
    * removed unused imports

Fixes:
    * added missing imports
    * using string in dictionary keys
2019-07-10 17:56:20 +02:00
Michael Bideau 3c53170e4a Supporting to create a 'dossier' from a real request (no more hardcoded payload)
Features:
    * added support for a payload build from the request instead of hardcoded in
      function 'create_dossier()'
    * added a warning message when an APIError is raised all functions
    * added the name/key of the error in the error message build from a response
    * added a function 'normalize()' to normalize user's input in the payload
    * changed endpoint arguments coming from request parameters instead of URI path
      in functions 'create_dossier()', 'get_dossier()', 'get_courrier()' and
      'get_fwd_files_status()'
    * changed JSON response to use an explicit key to hold file data in function
      'create_dossier()':'recepisse' and 'get_courrier()':'courrier'
    * removed the useless key 'data' in all the JSON response
    * removed useless case 'jsondata' in function 'afile()'

Cleaning:
    * Removed useless variable 'dossier_payload'

Tests:
    * added request containing the payload in the test case for 'create_dossier()'
    * added the name/key of the error in the error message build from a response
    * used the explicit keys 'recepisse' and 'courrier' in JSON responses
    * removed the 'data' key from JSON responses
2019-05-07 16:46:02 +00:00
Michael Bideau a53e30ca9e Initial import of the tests files 2019-05-06 15:34:55 +00:00
Michael Bideau 01660430af Features
* function 'echofile()' support for posted file content, not just url

Bug fix
    * corrected file content in function 'afile()'
    * corrected payload assignment in function 'get_fwd_files_status()'
    * added 'type_dossier' to job creation in function 'create_dossier()'

Coding style: better indentation
Logging     : 'debug' instead of 'info'
Locale      : identifier in english instead of french
2019-05-06 15:27:25 +00:00
Michael Bideau 0d4b51e9ba Initial import of source code (new models: AtrealOpenads, ForwardFile) 2019-04-30 12:21:06 +00:00