[#547] Ckanext test fixes
[#547] Pep8 fix
Merge branch 'master' into 547-plugins-love
[#744] Start writing tests for page-view tracking
[#744] Add tracking_enabled = true to test-core.ini

This makes the test_tracking.py tests pass
Merge branch 'master' of github.com:okfn/ckan into 744-tests-for-page-view-tracking

Conflicts:
	test-core.ini
[#792] Fix auth function
[#547] Add new test plugin
[#547] Improve the notification plugins
[#626] Tweaks dashboard to have 3 new subpages

A my datasets, my orgs and my groups pages. Each one showing ownership of the
relevant items within it.
[#506] Tidys up views to have better breadcrumbs for editin user
Merge branch 'master' into 547-plugins-love

Conflicts:
	ckan/config/environment.py
	ckanext/pdfpreview/tests/test_preview.py
	ckanext/textpreview/tests/test_preview.py

    trivial merges
[#547] Fix tests affected by merge
[#547] Fixes to final test fails
[#547] Fix not unloading plugin in legacy modeaw
[#953] Add API tests for private dataset activities

Add tests that no activities are emitted when creating, updating or
deleting private datasets via the API.

These could be more detailed, e.g. test adding, deleting and updating
groups as well, or moving the dataset between groups or between orgs, or
testing what happens when a private dataset is made public or
vice-versa.
[#953] Move new dataset visibility to first stage

Move the visibility option (public or private) when creating a dataset
to the first stage of the dataset creation form. This fixes the issue
(#953) that an activity is emitted when creating private datasets. Since
the dataset is actually created when the first form is submitted, and
the public/private setting is not chosen until the third form, the
dataset is public at the moment when it's created and an activity is
emitted.

It seems to make a lot more sense fo the visibility option to be on the
first form next to the organization option anyway.

Fixes #953.
[#953] Allow anyone to read datasets with no org

If a dataset has no owner organization, authorize anyone to read that
dataset (regardless of whether it's public or private).
[#953] Fix display or Organization and Visibility dropdowns

Fix the logic for displaying the Organization and Visibility dropdowns
when creating or updating a dataset.

We really need frontend tests for this.

I tested these cases manually:

User is not logged in and anon_create_dataset = True: neither
Organization nor Visibility shows, either when creating or when updating
a dataset.

User is logged in, but is not a member of any organization: neither
Organization nor Visibility shows, either when creating or when updating
a dataset. Tested both when the site has no organizations and when the
site does have orgs but user is not a member of any.

User is logged in, and is a member of an organization: Both Organization
and Visibility show when creating a dataset.

When creating a private dataset, no activities appear in the activity
stream.

User is logged in, and is a member of an organization, but dataset is
not a member of any org: neither Organization nor Visibility shows when
updating a dataset.

User is logged in, and is a member of an organization, and dataset is a
member of any org: Visibility shows but Organization does not show when
updating a dataset.

User is sysadmin, site has no orgs: neither Organization nor Visibility
shows when creating or updating a dataset.

User is sysadmin, site does have orgs: both Organization and Visibility
show when creating or updating a dataset.
resource_update: use package_update like resource_create does