aboutsummaryrefslogtreecommitdiffstats
path: root/test.py
diff options
context:
space:
mode:
authoripknHama <ipknhama@gmail.com>2014-04-20 17:45:10 +0900
committeripknHama <ipknhama@gmail.com>2014-04-20 17:45:59 +0900
commit1173eba33240071a52991f6755623a324742d0b7 (patch)
treedca3c85e2a2a47c935a52ff70508336b50bb42fe /test.py
parent5cdffdf9f75997bfa821203123305b9f8c24b463 (diff)
downloadcrow-1173eba33240071a52991f6755623a324742d0b7.tar.gz
crow-1173eba33240071a52991f6755623a324742d0b7.zip
add support for handlers with request argument, add http method
Diffstat (limited to 'test.py')
-rw-r--r--test.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/test.py b/test.py
index c7bc552..8af676b 100644
--- a/test.py
+++ b/test.py
@@ -1,8 +1,8 @@
import urllib
-assert "Hello World!" == urllib.urlopen('http://localhost:8080').read()
-assert "About Flask example." == urllib.urlopen('http://localhost:8080/about').read()
-assert 404 == urllib.urlopen('http://localhost:8080/list').getcode()
-assert "3 bottles of beer!" == urllib.urlopen('http://localhost:8080/hello/3').read()
-assert "100 bottles of beer!" == urllib.urlopen('http://localhost:8080/hello/100').read()
-assert "" == urllib.urlopen('http://localhost:8080/hello/500').read()
-assert 400 == urllib.urlopen('http://localhost:8080/hello/500').getcode()
+assert "Hello World!" == urllib.urlopen('http://localhost:18080').read()
+assert "About Flask example." == urllib.urlopen('http://localhost:18080/about').read()
+assert 404 == urllib.urlopen('http://localhost:18080/list').getcode()
+assert "3 bottles of beer!" == urllib.urlopen('http://localhost:18080/hello/3').read()
+assert "100 bottles of beer!" == urllib.urlopen('http://localhost:18080/hello/100').read()
+assert 400 == urllib.urlopen('http://localhost:18080/hello/500').getcode()
+assert "3" == urllib.urlopen('http://localhost:18080/add_json', data='{"a":1,"b":2}').read()