summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Dent <cdent@anticdent.org>2018-10-23 15:40:54 +0100
committerChris Dent <cdent@anticdent.org>2018-10-23 15:40:54 +0100
commit5ee64fa8d48d6d853e30f57d80e271184ceee993 (patch)
tree560b4349d567c7dde29f9b3a61e7ef909c8d3ab1
parentc48efceacb313d22a41b464539b0e9cf0f907eee (diff)
downloadpaste-git-5ee64fa8d48d6d853e30f57d80e271184ceee993.tar.gz
Fix proxy test
The proxy test relied on pythonpaste.org being up and existing. It is neither. So instead we use httpbin.org which is often used for this kind of thing. Unfortunately httpbin is now a react app which means a lot of the HTML is generated client-side, which means we need to choose wisely. As the original comments indicate, the test is not particularly robust and remains so.
-rw-r--r--tests/test_proxy.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_proxy.py b/tests/test_proxy.py
index 44db9f3..844f9a0 100644
--- a/tests/test_proxy.py
+++ b/tests/test_proxy.py
@@ -1,12 +1,12 @@
from paste import proxy
from paste.fixture import TestApp
-def test_paste_website():
+def test_proxy_to_website():
# Not the most robust test...
# need to test things like POSTing to pages, and getting from pages
# that don't set content-length.
- app = proxy.Proxy('http://pythonpaste.org')
+ app = proxy.Proxy('http://httpbin.org')
app = TestApp(app)
res = app.get('/')
- assert 'documentation' in res
-
+ # httpbin is a react app now, so hard to read
+ assert '<title>httpbin.org</title>' in res