23 Commits

Author SHA1 Message Date
a322aee0c7 Added file upload support to AbstractPillarTest.client_request 2016-07-08 12:34:49 +02:00
8a7c7afc3c Bugfix 2016-07-08 12:34:49 +02:00
2bdfbaea13 Test tearDown: remove all 'application.xxx' submodules from sys.modules
This ensures that the modules are reloaded for every test, for better
test separation.
2016-07-07 14:59:22 +02:00
c871089eab Added AbstractPillarTest.{get,post,put,post,delete} utility functions.
These functions set the correct Content-Type header when JSON is given,
add a resp.json() function that also checks the response mime type,
and adds the correct Authorization header.
2016-07-07 14:58:34 +02:00
387cee227a Set default picture on image asset and texture nodes. 2016-06-30 11:55:36 +02:00
5e506abac9 AB-testing for home project
Only allows access to the home project to user with role 'homeproject'.
2016-06-28 14:12:29 +02:00
b4faf2245e Home project: create it when user tries to GET it. 2016-06-28 14:12:29 +02:00
3980133100 Moved creation of standard groups in unittests 2016-06-28 14:12:29 +02:00
9362f9b539 Remove links from returned file docs when user is not subscriber/demo/admin.
For unauthenticated/non-subscriber users, image file documents retain
their variations. All other documents have ther variations stripped.
Also the links + expiry info to the original file are removed for all
file types.
2016-05-10 12:35:21 +02:00
5c04cdbd6e Secure read access to /users endpoint.
- auth field is never returned
- unauthenticated access is rejected
- non-admin users can only access themselves
2016-04-26 12:38:44 +02:00
aa47c2b4a6 Allow overriding Eve settings from env in test
Environment variables for Eve settings are now used in unit tests.
2016-04-26 12:34:16 +02:00
5c590c4dc4 Put Eve in debug mode when unittesting.
This gives us much more concrete information when a test fails.
Note that this info is generally put into the HTTP response data,
and not logged to any logger.
2016-04-25 16:14:05 +02:00
9a400d5414 Use the new /p/create function from manage.py too. 2016-04-19 16:50:51 +02:00
4b9dd29ad5 Added /p/create entry point to create new projects.
This requires the user to be logged in. The project will be owned by that
user.
2016-04-19 16:50:46 +02:00
d808b76d65 Store is_subclient_token bool in token collection. 2016-04-15 16:27:24 +02:00
4e9182ef38 Missed BlenderID API change in unittest 2016-04-15 14:27:54 +02:00
0bdd3b0a31 Updated for changes in BlenderID validate_token URL and response.
See BlenderID change 432034f858fbfd695f3ce0a0b3724524de7a05bb
2016-04-15 12:19:43 +02:00
66eeb25529 Unify tokens and subclient tokens
SCST tokens are now stored in the 'tokens' table.
This unifies old token handling and new subclient-specific tokens.
Also ensures the BlenderID expiry of the token is taken into account.

Removes use of httpretty, in favour of responses.
2016-04-13 15:33:54 +02:00
aeee165ad8 subclient tokens: bugfix & return proper data.
Also introduces responses, as an alternative to httpretty (it works
better).
2016-04-12 15:24:50 +02:00
465b145609 More flexible, less error-prone configuration system.
WARNING: make a backup copy of your local config.py before pulling
this change, as Git will overwrite it without warning.

The configuration defaults to deployment settings, allowing overrides.
Overrides are read from config_local.py and from the file pointed to
by the PILLAR_CONFIG env var.
2016-04-04 14:59:11 +02:00
ce242e1de3 Added manage.py command to refresh (almost) expired links.
manage.py refresh_project_links  5672beecc0261b2005ed1a33 -c 4

This refreshes the oldest 4 links of that project.
2016-04-01 13:03:27 +02:00
7c04e01cde Some security fixes and other fixes for file storage.
Also added unittests for creating files.
2016-03-25 18:23:01 +01:00
d7ee2121d9 Renamed some test_xxx files to common_test_xxx.py
Those files contain stuff for tests, but don't contain tests themselves.
2016-03-25 16:05:36 +01:00