Create a table entitiy to use as the mapping source.
(self, collection, entity_id)
| 29 | self.content_hash = archive.archive_file(fixture) |
| 30 | |
| 31 | def create_table_entity(self, collection, entity_id): |
| 32 | """Create a table entitiy to use as the mapping source.""" |
| 33 | data = { |
| 34 | "id": entity_id, |
| 35 | "schema": "Table", |
| 36 | "properties": { |
| 37 | "csvHash": self.content_hash, |
| 38 | "contentHash": self.content_hash, |
| 39 | "mimeType": "text/csv", |
| 40 | "fileName": "experts.csv", |
| 41 | "name": "experts.csv", |
| 42 | }, |
| 43 | } |
| 44 | |
| 45 | table = EntityProxy.from_dict(model, data, cleaned=False) |
| 46 | table.id = collection.ns.sign(table.id) |
| 47 | index_proxy(collection=collection, proxy=table) |
| 48 | |
| 49 | return table |
| 50 | |
| 51 | def create_mapping(self, collection, table, role): |
| 52 | query = { |
no test coverage detected