def test_write(self, RecordList):
    out = BytesIO()
    archive = ZipFile(out, mode='w')
    manifest = Manifest()
    records = RecordList()
    xml = tostring(records.to_tree())
    records._write(archive, manifest)
    manifest.append(records)
    assert (archive.namelist() == [records.path[1:]])
    assert manifest.find(records.mime_type)
def test_write(self, RecordList):
    out = BytesIO()
    archive = ZipFile(out, mode='w')
    manifest = Manifest()
    records = RecordList()
    xml = tostring(records.to_tree())
    records._write(archive, manifest)
    manifest.append(records)
    assert (archive.namelist() == [records.path[1:]])
    assert manifest.find(records.mime_type)