[ckan-changes] [okfn/ckan] 156092: [#299] Clear up changes to Pylons' config between ...

GitHub noreply at github.com
Thu Jan 24 16:03:18 UTC 2013


  Branch: refs/heads/299-bug-ckanext-tests-failures
  Home:   https://github.com/okfn/ckan
  Commit: 156092daa85f35d47dec46857c814e2e3b69b458
      https://github.com/okfn/ckan/commit/156092daa85f35d47dec46857c814e2e3b69b458
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-01-24 (Thu, 24 Jan 2013)

  Changed paths:
    M ckan/config/middleware.py
    M ckan/tests/functional/api/test_email_notifications.py
    M ckan/tests/functional/test_storage.py
    M ckan/tests/functional/test_upload.py
    M ckan/tests/test_plugins.py
    M ckanext/jsonpreview/tests/test_preview.py
    M ckanext/pdfpreview/tests/test_preview.py
    M ckanext/reclinepreview/tests/test_preview.py
    M ckanext/resourceproxy/tests/test_proxy.py
    M ckanext/stats/tests/__init__.py
    M doc/writing-extensions.rst

  Log Message:
  -----------
  [#299] Clear up changes to Pylons' config between tests

We also, instead of always loading test.ini in these tests, we use whatever Pylons loaded.


  Commit: 716d2643165f1c55ea359e0e28061e1402a61663
      https://github.com/okfn/ckan/commit/716d2643165f1c55ea359e0e28061e1402a61663
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-01-24 (Thu, 24 Jan 2013)

  Changed paths:
    M ckan/new_authz.py

  Log Message:
  -----------
  [#299] Reload AuthFunctions if couldn't find the action we're looking for

The problem I found was when you're testing a bunch of things
sequentially. Then, the first time that method is called, it
loads all known AuthFunctions and puts into a cache. Then it
only checks that cache.

But what happens if some code, after this has happened, adds
a new AuthFunction? It never gets added to the cache.

With this change, if we have the requested function on cache,
we use it. If not, we refresh the cache and see if something
changed.


  Commit: cc70777c163e21d0e1cdce577ecb38c00fcd3d7a
      https://github.com/okfn/ckan/commit/cc70777c163e21d0e1cdce577ecb38c00fcd3d7a
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-01-24 (Thu, 24 Jan 2013)

  Changed paths:
    M ckanext/jsonpreview/tests/test_preview.py
    M ckanext/pdfpreview/tests/test_preview.py
    M ckanext/reclinepreview/tests/test_preview.py
    M ckanext/stats/tests/test_stats_lib.py

  Log Message:
  -----------
  [#299] Clear test data after each test is run

This might not be the best way to do it. It's too repetitive, but it's
better than leaving trash behind.

We might investigate running the tests inside a transaction, and rolling
back when we're done (is it done already?).


  Commit: 7a66d748e6be03150815b7a987b3bdf1a3de38e0
      https://github.com/okfn/ckan/commit/7a66d748e6be03150815b7a987b3bdf1a3de38e0
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-01-24 (Thu, 24 Jan 2013)

  Changed paths:
    M .travis.yml

  Log Message:
  -----------
  [#299] Run ckan and ckanext tests on Travis


Compare: https://github.com/okfn/ckan/compare/3e7b48f9aa2b...7a66d748e6be


More information about the ckan-changes mailing list