Use testresources for example files

The example files were loaded at import time rather than used as
a test fixture.

Change-Id: I3c1ac4db4b269725bf83904c1568a86b45eb7e55
Rename tokenauth to authtoken in the doc

Change-Id: Iedacd3ac76999570d5507953b9665948a3e3888f
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
Don't install pre-release software with tox

Override the tox pip install command to avoid using the
"--pre" option which is the default in tox.  "--pre" means "Include
pre-release and development versions."  By default, pip will only
install stable versions of software, and that is the behavior we want.

Change-Id: Ida5e440d1bdb9f8e9031277ea53a02d2ef171438
Co-Authored-By: Monty Taylor <mordred@inaugust.com>
Make _get_utf8_value Python3 compliant

This function now works with both Python 2 and 3.

Thanks to Victor Stinner for helping with this.

Change-Id: I1644db7705f7818471d06fb74a4b9a91956e6b58
Remove the 'cmp' keyword from a call to 'sort()'

This keyword does not exist in Python 3, and 'key' should be used instead.

Change-Id: I0f92a1e3d389b491bf138c215e11e68fddc15477
HTTPretty: update to 0.7.1

The 0.7.1 release has a fix for the parse_querystring function, which raised a
TypeError on Python 3.3. See:

https://github.com/gabrielfalcao/HTTPretty/commit/5c6e77615f4083b9daf4a0148349f3185dcaff05

This helps fix some tests on Python3.3.

Change-Id: I8f28c5dfdcb25b2c131a4b8866547025064caac6
Update requirements

Updated requirements from commit hash 97620646d .

Change-Id: Id10bc656100770bf567f3d34e8e0872867f2d551
Add service catalog to domain scoped token fixture

This was simply forgotten previously and testing that required a service
catalog was done with the project token. This has led to some problems
of not testing the domain paths correctly.

Fix the one test that was incorrectly relying on an empty service
catalog being returned from a domain scoped token.

Change-Id: I66e3a9302d6a73ba17d4ed45f2366d9bb91461ab
Fix missed management_url setter in v3 client

Setting management_url is intended to mean that this is an overriding
URL not one received from the service catalog. This was fixed for
project scoped tokens but was missed from domain scoped tokens.

Change-Id: I8484f4a26a5695ef7ae962918ad442fe20bd2caa
Related Change: I2fa41e2ae1b853bbb254698cf94b9314eb0f0903
Related-Bug: #1252927
Move redirect handling to session

Particularly 305 is expected to be handled by the tests so we need to
handle this centrally if we want to have session and non-session clients
to work the same way.

Change-Id: Id4ec35ddd8b8304d24df9e6cd2ab995d123ef125
Correctly handle auth_url/token authentication

Previously the client assumed that if a user passed a token then this
token should be used for everything. This assumption is correct for the
endpoint/token case but not in the auth_url/token case where you will
want to fetch a new token. This is needed in the case where you want to
use an existing token to fetch a token that is re-scoped or activate a
trust.

There are still problems such as if you use auth_url/token
authentication then when the token expires it will try to refresh it,
but authenticating with a token will not extend the token expiry.

Closes-Bug: #1257541
Change-Id: I1c35600ca5437da44071dcea5361bfb42f6b72a3
Fix error in v3 credentials create/update

The v3 credentials passes data associated with the credential in
a "data" key, but the underlying API expects "blob", which is also
what is documented in the API spec.

Currently any attempt to create a credential with a type of 'ec2'
will fail with 'Invalid blob in credential' So s/data/blob to fix.

Change-Id: I0858e8c39653477eb554ee9d15fb4f2dde2b195c
Closes-Bug: #1259461
v3 test utils, don't modify input parameter

As mentioned in https://review.openstack.org/#/c/61046/ for
test_update, we should not modify the input req_ref in test_create
instead we should make a copy

Change-Id: I649433596a3ebbf2133eb724f09eb4bd470b7cdd
Merge "Add service catalog to domain scoped token fixture"
Merge "Fix missed management_url setter in v3 client"
Merge "Don't install pre-release software with tox"
Merge "Rename tokenauth to authtoken in the doc"
Merge "HTTPretty: update to 0.7.1"
Merge "Move redirect handling to session"
Merge "Make _get_utf8_value Python3 compliant"