diff options
author | ipknHama <ipknhama@gmail.com> | 2014-04-20 17:45:10 +0900 |
---|---|---|
committer | ipknHama <ipknhama@gmail.com> | 2014-04-20 17:45:59 +0900 |
commit | 1173eba33240071a52991f6755623a324742d0b7 (patch) | |
tree | dca3c85e2a2a47c935a52ff70508336b50bb42fe /test.py | |
parent | 5cdffdf9f75997bfa821203123305b9f8c24b463 (diff) | |
download | crow-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.py | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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() |