[ckan-changes] [ckan/ckan] a44257: [#2856] Tweaks after review

GitHub noreply at github.com
Fri Mar 25 10:34:45 UTC 2016


  Branch: refs/heads/2856-fix-datapusher-multiple-calls
  Home:   https://github.com/ckan/ckan
  Commit: a442577e77640b5a1e4a1d75097cbdcd68084a5a
      https://github.com/ckan/ckan/commit/a442577e77640b5a1e4a1d75097cbdcd68084a5a
  Author: amercader <amercadero at gmail.com>
  Date:   2016-03-25 (Fri, 25 Mar 2016)

  Changed paths:
    M ckanext/datapusher/logic/action.py

  Log Message:
  -----------
  [#2856] Tweaks after review


  Commit: f63a9723886bd601fdf893e772c335859f25afe5
      https://github.com/ckan/ckan/commit/f63a9723886bd601fdf893e772c335859f25afe5
  Author: amercader <amercadero at gmail.com>
  Date:   2016-03-25 (Fri, 25 Mar 2016)

  Changed paths:
    M ckan/tests/helpers.py

  Log Message:
  -----------
  [#2856] Add decorator to mock a CKAN action in tests

Because of the way actions are accessed via `get_action`, it is a pain to mock
them. This decorator adds a mock object for the provided action as a parameter
to the test function. The mock is discarded at the end of the function, even
if there is an exception raised.

This mocks the action both when it's called directly via
`ckan.logic.get_action` and via `ckan.plugins.toolkit.get_action`


  Commit: 534621c5f3005bb1836b890b2bc8a38f20d61404
      https://github.com/ckan/ckan/commit/534621c5f3005bb1836b890b2bc8a38f20d61404
  Author: amercader <amercadero at gmail.com>
  Date:   2016-03-25 (Fri, 25 Mar 2016)

  Changed paths:
    A ckanext/datapusher/tests/test_action.py

  Log Message:
  -----------
  [#2856] Added tests for DataPusher submissions

Test basic behaviour and resubmissions if updates are performed during
an ongoing job.


Compare: https://github.com/ckan/ckan/compare/b6c3b82646fe...534621c5f300


More information about the ckan-changes mailing list