-
Notifications
You must be signed in to change notification settings - Fork 432
More informative error when failing to open secrets file. #349
Conversation
PS Sorry if tests fail. I am with a temporary machine and it was becoming cumbersome. |
@waprin You seem to know more about Django than I do 😀 It seems 1.8.7 was release on Nov. 24 (2015) and is causing some test failures which weren't previously an issue.
(Though in Python 2.6, the only error is my use of |
@dhermes #350 adds a commit fixes the app isue for py27 /Django 1.9. It overlaps with the Django decorator PR which is still to be merged. The fact that django_orm did slightly hacky things to setup the Django env has caused these annoyances. Nathaniel seems skeptical of using the lots-of-files Django convention in the PR but I think these type of problems makes a case for just following Django conventions when possible (and might be easier to swallow once its in contrib package). As for your 2.6 problem, sounds like you just need to just not use assertRaises (also, surprised this library still needs to support 2.6). Given Django isn't supporting 3.3, maybe we should setup the tox environment to not run the Django tests in the 3.3 testenv, but I'm still a bit confused because the Django code looks like it does a version check and backports the feature. Investigating now. |
Thanks. |
In particular - Upgraded some unit test modules to `unittest2`. - Got to 100% line coverage in `test_jwt`, `test_clientsecrets`, and `test_service_account` by using `self.assertRaises` instead of `self.fail()` - In some places used `self.assertRaises` as a context manager so the thrown exception can be inspected / compared against. This is done instead of manually catching the exception and holding on to it (`unittest2` backports this feature from `unittest` that was not available in Python 2.6) - Added license to `test_multistore_file` - Removed legacy `python2.4` hashbang from `test_jwt` and `test_service_account` - Added `unittest2` as a test dependency in `tox.ini` - Updated `test_clientsecrets.test_load_by_filename_missing_file` to use the `self.assertRaises` context manager (this was a problem in googleapis#349 and googleapis#350) - Updated `test_jwt` module docstring to reflect actual purpose
In particular - Upgraded some unit test modules to `unittest2`. - Got to 100% line coverage in `test_jwt`, `test_clientsecrets`, and `test_service_account` by using `self.assertRaises` instead of `self.fail()` - In some places used `self.assertRaises` as a context manager so the thrown exception can be inspected / compared against. This is done instead of manually catching the exception and holding on to it (`unittest2` backports this feature from `unittest` that was not available in Python 2.6) - Added license to `test_multistore_file` - Removed legacy `python2.4` hashbang from `test_jwt` and `test_service_account` - Added `unittest2` as a test dependency in `tox.ini` - Updated `test_clientsecrets.test_load_by_filename_missing_file` to use the `self.assertRaises` context manager (this was a problem in googleapis#349 and googleapis#350) - Updated `test_jwt` module docstring to reflect actual purpose
In particular - Upgraded some unit test modules to `unittest2`. - Got to 100% line coverage in `test_jwt`, `test_clientsecrets`, and `test_service_account` by using `self.assertRaises` instead of `self.fail()` - In some places used `self.assertRaises` as a context manager so the thrown exception can be inspected / compared against. This is done instead of manually catching the exception and holding on to it (`unittest2` backports this feature from `unittest` that was not available in Python 2.6) - Added license to `test_multistore_file` - Removed legacy `python2.4` hashbang from `test_jwt` and `test_service_account` - Added `unittest2` as a test dependency in `tox.ini` - Updated `test_clientsecrets.test_load_by_filename_missing_file` to use the `self.assertRaises` context manager (this was a problem in googleapis#349 and googleapis#350) - Updated `test_jwt` module docstring to reflect actual purpose
Fixes #348.