Roberto Rosario
a99b044555
Code style improvement. Test code consolidation. PEP8 cleanups.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-10-06 02:13:36 -04:00
Roberto Rosario
4d53c9aec7
Code clean up.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-09-17 02:54:47 -04:00
Roberto Rosario
4eab4670be
Unify tests that use upload documents. Add explicit mode when opening a file.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-09-06 03:38:17 -04:00
Roberto Rosario
694b3dd629
Add document page API test case.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-06 02:57:52 -04:00
Roberto Rosario
0edb028bbf
Finish updating DocumentAPITestCase tests to test for access.
...
Start updateing DeletedDocumentAPITestCase tests to test the access.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-01 18:19:11 -04:00
Roberto Rosario
cc7f69b908
Continue updating the document app API tests to work with access and permission
...
level testing.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-01 18:16:03 -04:00
Roberto Rosario
1d5a60ef9e
Update DocumentTypeAPITestCase to with test with/without access.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-01 18:10:02 -04:00
Michael Price
b45be228d2
Update the remaining document app API tests to test with and without permissions.
...
Update the remaining API tests to conform to the updated API test class interface.
Signed-off-by: Michael Price <loneviking72@gmail.com >
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-01 02:30:37 -04:00
Michael Price
1d0ef774e6
Update the remaining document app API tests to test with and without permissions. Update the remaining API tests to conform to the updated API test class interface.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-01 01:38:11 -04:00
Roberto Rosario
1faa63f56c
Move extension preservetation code to the model. Improve document,
...
version and API views to include proper mimetype and encoding.
Update respective tests. GitLab issue #415 .
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-08-15 00:18:34 -04:00
Roberto Rosario
5fedc2c3b0
Make document version order deterministic.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-07-21 17:20:58 -04:00
Roberto Rosario
f09321f6ab
Fix deprecation warnings for Django 1.11 and Django 2.0.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-07-21 00:25:18 -04:00
Roberto Rosario
f9eb7d0fb5
Renamed the document type permission namespace from "Document setup" to "Document types".
...
Add support for granting the document type edit, document type delete, and document type view
permissions to individual document type instances.
Improved tests by testing for accesses.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-07-17 20:41:11 -04:00
Roberto Rosario
16e0b0e0e7
Add new document version list view permission. GitLab issue #379
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-07-14 22:09:01 -04:00
Roberto Rosario
80f64d7fcf
Add BaseAPITestCase class that invalidates the permission and smart settings caches.
...
Use BaseAPITestCase for all API test cases.
2017-02-16 21:12:55 -04:00
Roberto Rosario
81e090f375
Update the document app API endpoints.
...
Use resource/<pk>/subresource/<pk> scheme.
2017-02-14 02:42:40 -04:00
Roberto Rosario
ce6f59b9bd
Merge remote-tracking branch 'origin/master' into feature/merge_master
2017-02-13 21:00:56 -04:00
Roberto Rosario
92ac4dc2f7
Add writable versions of the Document and Document Type serializers (GitLab issues #348 and #349 ).
2017-02-12 03:11:24 -04:00
Roberto Rosario
7340989dc5
Fix trashed document list API view. Add addition trashed document API tests.
2017-02-07 20:46:30 -04:00
Roberto Rosario
5f99b123d7
Merge branch 'master' into master_merge
2017-02-03 14:08:34 -04:00
Roberto Rosario
2f67f0cffa
Improve document version comment API tests.
...
Add document description update API tests.
GitLab issues #348 and #349 .
2017-01-28 18:15:25 -04:00
Roberto Rosario
b55b6dc117
Add API test for document version comment editing via PUT and PATCH.
...
GitLab issue #348 .
2017-01-28 11:20:24 -04:00
Roberto Rosario
c0194c63dc
Refactor document page image generation and transformation classes
...
to cache all transformed versions of a document page.
2016-11-02 02:34:57 -04:00
Roberto Rosario
6e3d99670c
Complete conversion of download views to CBV views using django-downloadview.
...
This also removes dependency on the filetransfers library.
2016-10-31 01:00:35 -04:00
Roberto Rosario
39ba601074
Fix API endpoint view name in trashed document API tests.
2016-05-11 00:40:42 -04:00
Roberto Rosario
9823202405
Remove typecasting of file objects into Django's File class, not needed in Django >1.8.x.
2016-03-14 20:20:54 -04:00
Roberto Rosario
10eb7d49b2
Update API tests to use login instead of force_authenticate.
2016-02-04 17:39:27 -04:00
Roberto Rosario
2ebb84f18f
Remove remaining direct references to the User model. Closes GitLab issue #225 .
2016-01-28 05:55:15 -04:00
Roberto Rosario
58f73f0b1e
Use Django's six library for Py3 compatibility.
2015-10-21 03:33:10 -04:00
Roberto Rosario
df7a5c6e1c
Reorganize tests literals and move then to their respective apps.
2015-10-20 21:14:07 -04:00
Roberto Rosario
64faa0ca15
Fix documents app view tests. Update code to match code style. PEP8 fixes.
2015-10-19 01:54:37 -04:00
Roberto Rosario
8bdd4ba452
Add API views to download documents and document versions.
2015-10-07 02:42:36 -04:00
Roberto Rosario
6ccfaf59f8
Add 1 second delay to workaround MySQL <5.6.4 not storing millisecond time data which is used to determine lastest version of a document.
2015-09-21 04:19:57 -04:00
Roberto Rosario
bd01fe1b72
Add 1 seconds delay to avoid version revert tests failing on MySQL. This is because MySQL doesn't store milliseconds in the DB. Version revert uses timestamp as the original document and the new version are created within the same second the revert code doesn't work. This delay is a hack and a better solution to differentiate versions by serial or similar needs to be implemented.
2015-09-17 02:57:28 -04:00
Roberto Rosario
3e3eca4c0e
Update all tests to use setting value overriding.
2015-09-06 04:01:40 -04:00
Roberto Rosario
683e54fea1
Replace unused lists with tuples.
2015-08-19 13:57:38 -04:00
Roberto Rosario
4fb86fba14
Re-estructure tests to cleanup the apps' namespace.
2015-08-18 23:06:26 -04:00