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

GitHub noreply at github.com
Thu Jan 24 20:05:34 UTC 2013


  Branch: refs/heads/299-bug-ckanext-tests-failures
  Home:   https://github.com/okfn/ckan
  Commit: 451ddc12494d0cdab87316fee95ef756c97a6626
      https://github.com/okfn/ckan/commit/451ddc12494d0cdab87316fee95ef756c97a6626
  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: 3848cb7a00795768e81e7cfcb9d2b73191c9d2a2
      https://github.com/okfn/ckan/commit/3848cb7a00795768e81e7cfcb9d2b73191c9d2a2
  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: 729a6347cf9af5e3cffe4b63259c3935646214b9
      https://github.com/okfn/ckan/commit/729a6347cf9af5e3cffe4b63259c3935646214b9
  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: 2fe6adda3e21ffb6bedb34f576a52f18aba3e033
      https://github.com/okfn/ckan/commit/2fe6adda3e21ffb6bedb34f576a52f18aba3e033
  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


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

  Changed paths:
    M .travis.yml

  Log Message:
  -----------
  Testing running only ckanext on travis


Compare: https://github.com/okfn/ckan/compare/678994544981...4fb9b31b35c8


More information about the ckan-changes mailing list