Mercurial > hg > FileServer
comparison tests/doctest.txt @ 10:1a11c096284b
som more tests
| author | Jeff Hammel <jhammel@mozilla.com> |
|---|---|
| date | Wed, 29 Feb 2012 15:04:03 -0800 |
| parents | 68db1111f23a |
| children | 1aaf2ba89b30 |
comparison
equal
deleted
inserted
replaced
| 9:68db1111f23a | 10:1a11c096284b |
|---|---|
| 41 >>> response = testapp.get('/helloworld.txt') | 41 >>> response = testapp.get('/helloworld.txt') |
| 42 >>> response.status | 42 >>> response.status |
| 43 200 | 43 200 |
| 44 >>> response.body == file(filename).read() | 44 >>> response.body == file(filename).read() |
| 45 True | 45 True |
| 46 | |
| 47 Ensure you get a 404 for nonexistent resources:: | |
| 48 | |
| 49 >>> response = testapp.get('/notfound.bin', status=404) | |
| 50 >>> response.status | |
| 51 404 | |
| 52 |
