def test_if_modified_since_future(self): next_year = datetime.utcnow() next_year.replace(year=next_year.year+1) r = self.app.get('/empty_file.unknown', headers={'If-Modified-Since':FileServeApp.make_date(next_year)}, status=304)
def test_if_modified_since_future(self): next_year = datetime.utcnow() next_year.replace(year=next_year.year + 1) r = self.app.get( '/empty_file.unknown', headers={'If-Modified-Since': FileServeApp.make_date(next_year)}, status=304)
def test_make_date(self): res = FileServeApp.make_date(datetime(2000, 1, 1, 0, 0, 0, 0)) assert res == 'Sat, 01 Jan 2000 00:00:00 GMT'