* f string formatting, final of many
Standardize (i/count) handling
Add doc_string and follow PEP8 naming convention for page_message routines
* Clean up items in gapi.got_total_items_msg and gapi.got_total_items_first_last_msg
* Move transport customizations to their own module
This helps to accomplish a few things:
1) Makes the forced user-agent customization on HTTP requests a bit
clearer by subclassing the targeted objects (as opposed to hiding the
behavior behind a forced override of the google_auth_httplib2 object
methods)
2) Standardizes the creation of HTTP objects. These objects can still
largely be customized, but using a single creation mechanism will
standardize a default and streamline creation, thereby decreasing the
code that would otherwise be replicated in the caller
3) Moves create_http() to a more general purpose module, since it will
likely be used by more than gapi-related methods.
* Use string values for TLS version tests
More closely matches [existing
behavior](4fb73e6073/src/var.py (L853))
that sets the global default to a string value.
* Cleanup
gam,py:
In show sakays, only mark USER-MANAGED keys as current: true/false
gapi/__init__.py:
pylint cleanup: import order, indentation
gapi/errors.py:
pylint cleanup: import order, unused import, indentation
Recognize 502 Bad Gateway/Gateway Timeout: treat as retryable errors
This last change does not directly handle the refresh problem in Issue #1063 but in my version this seems to be the right solution to the 502 gateways errors
* In show sakeys, indicate whcij key was used to authenticate
* Show all sakeys by default
* Include unused import
* Remove unused import, fix unit tests
* Move callGAPIItems and add unit tests
* Move the page-related call() methods and add tests
Continues work on jay0lee/GAM#147
* Account for rand addition that rounds to 1.0
In this case, sleep time could be equal to 61
* Begin breaking apart gam.py into logical pieces
Start with one of the deepest parts of the stack, Google API request execution calls and associated errors. Critical information printing functions and application control logic are also broken out into their own components.
This change also adds unit tests for migrated content and makes code more PEP8 compliant.
This commit starts work on jay0lee/GAM#147
* Add unit tests to Travis config
* Swap assert_called_once() with assertEqual() and Mock.call_count
Makes tests compatible with Python 3.5. assert_called_once() is only available in Python 3.6+