Fix contains() tests.

Also remove Travis build with Python 3.1 (version not supported anymore)