Merge pull request #446 from Lukasa/test-urllib3

Add smoke tests for urllib3.
diff --git a/.travis.yml b/.travis.yml
index 06b5b70..7afcce2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -60,9 +60,11 @@
     env: TOXENV=pypy-cryptography1.1
 
 
-  # Make sure we don't break Twisted
+  # Make sure we don't break Twisted or urllib3
   - python: "2.7"
     env: TOXENV=py27-twistedMaster
+  - python: "3.5"
+    env: TOXENV=py35-urllib3Master
 
 
   # Also run at least a little bit against an older version of OpenSSL.
diff --git a/.travis/install_urllib3.sh b/.travis/install_urllib3.sh
new file mode 100755
index 0000000..1324ded
--- /dev/null
+++ b/.travis/install_urllib3.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+set -e
+set -x
+
+git clone --depth 1 https://github.com/shazow/urllib3.git
+pip install -r ./urllib3/dev-requirements.txt
+pip install ./urllib3[socks]
diff --git a/tox.ini b/tox.ini
index c2591b8..a1b7138 100644
--- a/tox.ini
+++ b/tox.ini
@@ -31,6 +31,21 @@
     python -c "import cryptography; print(cryptography.__version__)"
     trial twisted
 
+[testenv:py35-urllib3Master]
+basepython=python3.5
+deps =
+    pyasn1
+    ndg-httpsclient
+passenv = ARCHFLAGS CFLAGS LC_ALL LDFLAGS PATH LD_LIBRARY_PATH TERM
+whitelist_externals =
+    rm
+commands =
+    python -c "import OpenSSL.SSL; print(OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION))"
+    python -c "import cryptography; print(cryptography.__version__)"
+    {toxinidir}/.travis/install_urllib3.sh
+    nosetests urllib3/test
+    rm -rf ./urllib3
+
 [testenv:flake8]
 deps =
      flake8