Preserve exact HTTP bytes when replaying ECCV fixtures
Metadata integrity checks / metadata (push) Successful in 3m7s
Metadata integrity checks / metadata (push) Successful in 3m7s
This commit is contained in:
BIN
Binary file not shown.
+13
-3
@@ -19,10 +19,10 @@ class ECCV2026Tests(unittest.TestCase):
|
||||
def snapshots(self, root):
|
||||
official = root/'official'; paper = root/'paper'; official.mkdir(); paper.mkdir()
|
||||
for name, raw in self.bundle['official_pages'].items():
|
||||
(official/name).write_text(raw)
|
||||
(official/'manifest.json').write_text(self.bundle['official_manifest'])
|
||||
(official/name).write_bytes(raw.encode('utf-8'))
|
||||
(official/'manifest.json').write_bytes(self.bundle['official_manifest'].encode('utf-8'))
|
||||
for pid, raw in self.bundle['paper_pages'].items():
|
||||
(paper/(pid+'.html')).write_text(raw)
|
||||
(paper/(pid+'.html')).write_bytes(raw.encode('utf-8'))
|
||||
(paper/'manifest.json').write_text(json.dumps(self.bundle['paper_manifest']))
|
||||
return official, paper
|
||||
|
||||
@@ -102,3 +102,13 @@ class ECCV2026Tests(unittest.TestCase):
|
||||
fields = c.parse_paper(raw.replace('<p>Proactive tamper', '<p>10<sup>6</sup> Proactive tamper', 1), self.program['4048']['url'], self.program['4048'])
|
||||
self.assertIn('structured_abstract_markup_requires_review', fields['review_flags'])
|
||||
self.assertEqual(fields['abstract_markup_tags'], ['sup'])
|
||||
|
||||
def test_fixture_preserves_exact_http_bytes_including_crlf(self):
|
||||
import hashlib
|
||||
for receipt in json.loads(self.bundle['official_manifest'])['sources']:
|
||||
raw = self.bundle['official_pages'][receipt['file']].encode('utf-8')
|
||||
self.assertEqual(len(raw), receipt['bytes'])
|
||||
self.assertEqual(hashlib.sha256(raw).hexdigest(), receipt['sha256'])
|
||||
for receipt in self.bundle['paper_manifest']['records']:
|
||||
raw = self.bundle['paper_pages'][receipt['paper_id']].encode('utf-8')
|
||||
self.assertEqual(hashlib.sha256(raw).hexdigest(), receipt['sha256'])
|
||||
|
||||
Reference in New Issue
Block a user