Add authoritative ACL metadata and protect publication identities
Metadata integrity checks / metadata (push) Successful in 5s
Metadata integrity checks / metadata (push) Successful in 5s
This commit is contained in:
+9
-1
@@ -61,10 +61,18 @@ class StoreTests(unittest.TestCase):
|
||||
def test_missing_abstract_does_not_become_complete_coverage(self):
|
||||
path=Path(self.tmp.name)/'partial.jsonl'
|
||||
path.write_text(json.dumps({'source':'colm','external_id':'paper1','url':'https://example.org/paper1','title':'Paper','abstract':None,'authors':[],'venue':'COLM','year':2024,'track':'main','status':'accepted'})+'\n')
|
||||
path.with_suffix('.manifest.json').write_text(json.dumps({'source':'colm','list_url':'https://example.org/list','count':1,'status':'partial','missing_abstract_count':1}))
|
||||
path.with_suffix('.manifest.json').write_text(json.dumps({'source':'colm','parser_version':2,'list_url':'https://example.org/list','count':1,'status':'partial','missing_abstract_count':1}))
|
||||
ingest_file(self.db,path)
|
||||
self.assertEqual(self.store.conn.execute('SELECT status FROM edition_sources').fetchone()[0],'partial')
|
||||
|
||||
def test_legacy_proceedings_manifest_is_rejected_before_import(self):
|
||||
path=Path(self.tmp.name)/'old.jsonl'
|
||||
path.write_text('')
|
||||
path.with_suffix('.manifest.json').write_text(json.dumps({'source':'colm','count':1}))
|
||||
with self.assertRaisesRegex(ValueError,'parser_version'):
|
||||
ingest_file(self.db,path)
|
||||
self.assertEqual(self.store.conn.execute('SELECT count(*) FROM source_records').fetchone()[0],0)
|
||||
|
||||
|
||||
if __name__=='__main__':
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user