(self, collection, table, role)
| 49 | return table |
| 50 | |
| 51 | def create_mapping(self, collection, table, role): |
| 52 | query = { |
| 53 | "person": { |
| 54 | "schema": "Person", |
| 55 | "keys": ["name", "nationality"], |
| 56 | "properties": { |
| 57 | "name": {"column": "name"}, |
| 58 | "nationality": {"column": "nationality"}, |
| 59 | }, |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | mapping = Mapping.create( |
| 64 | query=query, |
| 65 | table_id=table.id, |
| 66 | collection=collection, |
| 67 | role_id=role.id, |
| 68 | ) |
| 69 | db.session.commit() |
| 70 | |
| 71 | return mapping |
| 72 | |
| 73 | def test_mappings_index(self): |
| 74 | table = self.create_table_entity( |
no test coverage detected