[ckan-changes] [okfn/ckan] 283264: [247] fixes #247 by disallowing anonymous users to...

GitHub noreply at github.com
Thu Jan 24 01:39:51 UTC 2013


  Branch: refs/heads/299-bug-ckanext-tests-failures
  Home:   https://github.com/okfn/ckan
  Commit: 283264476ed973181be0f26b2d639123fd87b391
      https://github.com/okfn/ckan/commit/283264476ed973181be0f26b2d639123fd87b391
  Author: Dominik Moritz <domoritz at gmail.com>
  Date:   2013-01-23 (Wed, 23 Jan 2013)

  Changed paths:
    M ckan/logic/auth/update.py

  Log Message:
  -----------
  [247] fixes #247 by disallowing anonymous users to edit something that they are not allowed to create


  Commit: 81c55c845242fe59234e869484d37fec44481933
      https://github.com/okfn/ckan/commit/81c55c845242fe59234e869484d37fec44481933
  Author: tobes <toby.junk at gmail.com>
  Date:   2013-01-23 (Wed, 23 Jan 2013)

  Changed paths:
    M ckan/logic/auth/update.py

  Log Message:
  -----------
  [#248] Fix auth function


  Commit: 4db57314ca209555876219f2804d8281b8bbb715
      https://github.com/okfn/ckan/commit/4db57314ca209555876219f2804d8281b8bbb715
  Author: tobes <toby.junk at gmail.com>
  Date:   2013-01-23 (Wed, 23 Jan 2013)

  Changed paths:
    M ckan/logic/auth/update.py

  Log Message:
  -----------
  [#247] Fix indent and trailing ))


  Commit: 3396b8ce5675980228d768c58c81b1c6f3e64ff2
      https://github.com/okfn/ckan/commit/3396b8ce5675980228d768c58c81b1c6f3e64ff2
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-01-23 (Wed, 23 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: 16906af43227f4ee05d4581a74ee87620ff75ebb
      https://github.com/okfn/ckan/commit/16906af43227f4ee05d4581a74ee87620ff75ebb
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-01-23 (Wed, 23 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: 93662293e8a13aa48021aa65b51c24d356069fcb
      https://github.com/okfn/ckan/commit/93662293e8a13aa48021aa65b51c24d356069fcb
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-01-23 (Wed, 23 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?).


Compare: https://github.com/okfn/ckan/compare/283264476ed9^...93662293e8a1


More information about the ckan-changes mailing list