(self, data: dict)
| 114 | yield from self._plugin.make_remote_scopes(c, group_id) |
| 115 | |
| 116 | def _mk_context(self, data: dict): |
| 117 | db_url = data['db_url'] |
| 118 | scope_dict = data['scope'] |
| 119 | scope = self._plugin.tool_scope_type(**scope_dict) |
| 120 | connection_dict = data['connection'] |
| 121 | connection = self._plugin.connection_type(**connection_dict) |
| 122 | scope_config_dict = data.get('scope_config') or {} |
| 123 | scope_config = self._plugin.scope_config_type(**scope_config_dict) |
| 124 | options = data.get('options', {}) |
| 125 | return Context(create_db_engine(db_url), connection, scope, scope_config, options) |
| 126 | |
| 127 | def create_db_engine(db_url) -> Engine: |
| 128 | # SQLAlchemy doesn't understand postgres:// scheme |
no test coverage detected