remove period requirement from tests
Dont' require period in transactions by channel yet

slc need to change first.
Merge pull request #168 from alphagov/dont-require-period-in-transactions-by-channel-yet

Dont require period in transactions by channel yet
Allow deletes when data_set not in backdrop

If the data set was not in backdrop, stagecraft would throw a server
error. This checks and logs the 404, but goes ahead with the deletion
anyway.

[Delivers #74216536]
Merge pull request #170 from alphagov/allow-deletes-when-object-not-in-backdrop

Allow deletes when data_set not in backdrop
Move long cache tests into correct file

The cache tests decorator is in utils.py, so test it there.
Change @token_required to @permission_required

As part of adding the admin app, we want to make sure that Stagecraft
is checking permissions with Sign-on-o-tron.

Whenever a client of Stagecraft makes a request that requires a bearer
token, Stagecraft now uses that token to check directly with Sign-on-o-tron.
Permissions derived from this check are used to allow or deny access to
Stagecraft resources.

- Change the dev-data-set-query-token to be a generic dev OAuth token
- Add a development user which is controlled using configuration
Remove the dataset permission

This is not needed. The data sets that are shown will be controlled by
the permissions of the backdrop_user.
Add failing test for list data sets

The list data sets view is only going to return the data sets that the
requesting user is allowed to see unless they have the admin permission.
Only list data sets a user has access to

- If the user has the 'admin' permission show them all data sets
otherwise;
- If the user has a backdrop_user show them the data sets they have
  access to
otherwise;
- Show the user an empty list of data sets
Merge pull request #171 from alphagov/signon-permissions

Use Signon for permissions
Only show data sets a user has access to

Same rules as in 012bb2210 applied to the detail view.
Merge pull request #172 from alphagov/oauth-list-data-sets-2

OAuth permissions for data sets
dev user should get admin, so we can do admin things
Merge pull request #173 from alphagov/add_admin_to_dev_user_perms

dev user should get admin, so we can do admin things
Tests for copy data migration stuff, add client to requirements

These tests expect a method `migrate_data_set` which will take an old data set config, override specified parts of it and create a new data set with this specification (or update an existing one that matches this identifiers of the exising one). Then it will load the old data sets data using the backdrop client, convert the data to a new format defined by `data_mapping` and post it to the backdrop data-set for the newly created data set config.
Add functions to migrate data sets which meet the specification fo the test

This could be refactored into an object as in the existing mass update script. It should perhaps take the whole mapping itself rather than receiving the three parts sensibly. We should also stop using the deprecrated find by name (we should use group and type)
Migration for the two mislabeled transactions by channel data sets

We are waiting to hear from cliff whether we also need to change the values for weekly claims to clerical_received being paper and so on. As monthly claims is not used we will not migrate this into the new carers allowance transaction by channel data set. There may be a requirement for other data sets to be combined in future however so we should determine if a script can add data to an existing data set already or if we will need to amend it. Adding to an existing data set with this script will require amending auto id so values are not overwritten.