change assertEquals to assertEqual

According to http://docs.python.org/2/library/unittest.html
assertEquals is a deprecated alias of assertEqual.

Change-Id: Ibf4d548b86c53f30830b7e34b019fa8f67997cd8
Remove testtools.main() call from tests

There is no testtools.main() at all (this was a
unittest.main() before). Let's remove this unused
and non-working code.

The following code can be used if someone needs
to start tests manually:

    python -m unittest <test_file.py>

Change-Id: Id5162ac73825584df6c23dbe68786ff3355fc6ae
fixed several pep8 issues

  * E111 indentation is not a multiple of four
  * E128 continuation line under-indented for visual indent
  * E265 block comment should start with '# '
  * E713 test for membership should be 'not in'

Tested with pep8 version 1.5.6 (2014-04-14).

Change-Id: I7f85c143d463c501a0df20724362ad5c0f2d4dde
Fix wrong assertions in unit tests

A couple of assertTrue in the test_swiftclient.py
unit tests should be assertEqual. Also, the expected
values now need to be bytes literals.

Change-Id: I7cc1bd60d9ba82d1a28fbae2e1243d3c799451bd
Merge "Remove testtools.main() call from tests"
Merge "fixed several pep8 issues"
Remove extra double quote from docstring

The extra " was visible on

  http://docs.openstack.org/developer/python-swiftclient/swiftclient.html

Change-Id: I7d61c8259a4f13464c11ae7e3fa28eb3a58e4baa
Use Emacs-friendly coding line.

To signal the file encoding to Emacs, one can add a line with

  -*- coding: your-favority-encoding -*-

Python also understands such a line, infact it also understands the
line if it says "encoding" instead of "coding".

However, it is only "coding" that has an effect in Emacs. Furthermore,
since "encoding" is not recognized, Emacs will prompt the user with a
scary looking message when the file is opened:

  The local variable list in __init__.py contains values that may not
  be safe.

Using the correct variable name fixes this.

(The file contain only ASCII characters at the moment, so the line
could alternatively be removed completely.)

Change-Id: Ie6b4f41043bf97bb59e3de403e4794c302d81783
Merge "change assertEquals to assertEqual"
Removed now unnecesary workaround for PyPy

Change-Id: I7bf6346edc399ec29b125b50eb7ac2cfbb87cdfa
replace string format arguments with function parameters

There are files containing string format arguments inside
logging messages. Using logging function parameters should
be preferred.

Change-Id: I90270908d27f0a57c184d5a547bb1af9b1381c95
Relax requirement for tenant_name in get_auth()

get_auth() in client.py raises an exception if
tenant_name is not included in the os_options
dict. This is overly constrained since tenant_id
is equally sufficient. This patch modifies
get_auth to require either tenant_name
or tenant_id.

Change-Id: Ibbcda1704637eb887efa5895579d260a1e072327
Add context sensitive help

Change-Id: I9aaadbaba2c43a12a83f8200eaaa96f48c52028e
Add CONTRIBUTING.md

There is no CONTRIBUTING.md file, the patch will add it.

Change-Id: Idc0a9ae22f2b315375b660263c7602e3ca02d56b
Merge "Removed now unnecesary workaround for PyPy"
Merge "Add context sensitive help"
Merge "replace string format arguments with function parameters"
Adding Swift Temporary URL support

Temporary URLs allow a user to sign an object URL with a shared
secret to so that the object can be downloaded without auth for
a specified amount of time.

http://docs.openstack.org/trunk/config-reference/content/object-storage-tempurl.html

Change-Id: Ife0b6c98c975e074d4dad0a31145573b784747c5
Allow to specify storage policy when uploading objects

Client already supports -H/--header option when creating container
or uploading objects. This patch extends this option to support
Storage Policy.

e.g.,
    swift post con -H 'X-Storage-Policy:p1'
This creates one container 'con' with storage policy 'p1'.

    swift upload con obj -H 'X-Storage-Policy:p2'
This creates container 'con' with storage policy 'p2' and uploads
object 'obj' into it.

Also fixes segmented uploading to non-default storage policy container

When uploading large objects with segmentation to container with
non-default storage policy, there will be another 'xxx_segments'
container created, but with the default storage policy. This
results all the segments to be stored with the wrong policy.

This patch is for the Storage Policy feature, and also
compatible with old versions w/o Storage Policy support.

Change-Id: I5c19e90604a0bcf2c85e1732b8a0b97ae6801994
Merge "Adding Swift Temporary URL support"