equal
deleted
inserted
replaced
68 |
68 |
69 def _check_datafile_ok(self, fname): |
69 def _check_datafile_ok(self, fname): |
70 with self._publish_static_files(fname) as req: |
70 with self._publish_static_files(fname) as req: |
71 self.assertEqual(200, req.status_out) |
71 self.assertEqual(200, req.status_out) |
72 self.assertIn('last-modified', req.headers_out) |
72 self.assertIn('last-modified', req.headers_out) |
|
73 self.assertIn('expires', req.headers_out) |
|
74 self.assertEqual(req.get_response_header('cache-control'), |
|
75 {'max-age': 604800}) |
73 next_headers = { |
76 next_headers = { |
74 'if-modified-since': req.get_response_header('last-modified', raw=True), |
77 'if-modified-since': req.get_response_header('last-modified', raw=True), |
75 } |
78 } |
76 with self._publish_static_files(fname, next_headers) as req: |
79 with self._publish_static_files(fname, next_headers) as req: |
77 self.assertEqual(304, req.status_out) |
80 self.assertEqual(304, req.status_out) |