(self)
| 134 | return time.strftime(TIME_FMT, time.gmtime(self.time_now - period)) |
| 135 | |
| 136 | def setup_method(self): |
| 137 | self.heuristic = LastModified() |
| 138 | self.time_now = time.time() |
| 139 | day_in_seconds = 86400 |
| 140 | self.year_ago = self.last_modified(day_in_seconds * 365) |
| 141 | self.week_ago = self.last_modified(day_in_seconds * 7) |
| 142 | self.day_ago = self.last_modified(day_in_seconds) |
| 143 | self.now = self.last_modified(0) |
| 144 | |
| 145 | # NOTE: We pass in a negative to get a positive... Probably |
| 146 | # should refactor. |
| 147 | self.day_ahead = self.last_modified(-day_in_seconds) |
| 148 | |
| 149 | def test_no_expiry_is_inferred_when_no_last_modified_is_present(self): |
| 150 | assert self.heuristic.update_headers(DummyResponse(200, {})) == {} |
nothing calls this directly
no test coverage detected