def _last_modified_set(self, date): if not date: return self._timestamp = timestamp(date) self.headers['Last-modified'] = format_httpdate(self._timestamp)
def test_timestamp(): eq_(timestamp(1234567890), 1234567890) eq_(timestamp(datetime.fromtimestamp(1234567890)), 1234567890)
def test_timestamp(): assert timestamp(1234567890) == 1234567890 assert timestamp(datetime.fromtimestamp(1234567890)) == 1234567890