diff tests/test_fileapp.txt @ 31:f00fcf6d9f1d

test not modified response
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 05 Mar 2012 13:49:07 -0800
parents 52103702a732
children 86b519dd8467
line wrap: on
line diff
--- a/tests/test_fileapp.txt	Mon Mar 05 13:40:15 2012 -0800
+++ b/tests/test_fileapp.txt	Mon Mar 05 13:49:07 2012 -0800
@@ -29,7 +29,7 @@
     6L
     >>> req = Request.blank('/')
     >>> res = req.get_response(app)
-    >>> print res # doctest:+ELLIPSIS
+    >>> print res 
     200 OK
     Content-Type: text/plain; charset=UTF-8
     Content-Length: 6
@@ -38,3 +38,11 @@
     <BLANKLINE>
     hello
     <BLANKLINE>
+    >>> req2 = Request.blank('/')
+    >>> req2.if_none_match = res.etag
+    >>> req2.get_response(app)
+    <Response ... 304 Not Modified>
+    >>> req3 = Request.blank('/')
+    >>> req3.if_modified_since = res.last_modified
+    >>> req3.get_response(app)
+    <Response ... 304 Not Modified>