MCPcopy Create free account
hub / github.com/alephdata/aleph / create_mapping

Method create_mapping

aleph/tests/test_mappings_api.py:51–71  ·  view source on GitHub ↗
(self, collection, table, role)

Source from the content-addressed store, hash-verified

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(

Callers 7

test_mappings_indexMethod · 0.95
test_mappings_viewMethod · 0.95
test_mappings_triggerMethod · 0.95
test_mappings_flushMethod · 0.95
test_mappings_updateMethod · 0.95
test_mappings_deleteMethod · 0.95

Calls 1

createMethod · 0.45

Tested by

no test coverage detected