def other_partitioned_db(valid_organization, valid_dataset, other_user, neo4j): from server import models as m organization_id, organization_node_id = valid_organization dataset_id, dataset_node_id = valid_dataset _, user_node_id = other_user return PartitionedDatabase( db=neo4j, organization_id=m.OrganizationId(organization_id.id), dataset_id=m.DatasetId(dataset_id.id), user_id=user_node_id, organization_node_id=organization_node_id, dataset_node_id=dataset_node_id, )
def another_partitioned_db(neo4j, valid_organization, valid_user, other_valid_dataset): """ Same organization, different dataset. TODO:rename this """ from server import models as m organization_id, organization_node_id = valid_organization dataset_id, dataset_node_id = other_valid_dataset _, user_node_id = valid_user return PartitionedDatabase( db=neo4j, organization_id=m.OrganizationId(organization_id.id), dataset_id=m.DatasetId(dataset_id.id), user_id=user_node_id, organization_node_id=organization_node_id, dataset_node_id=dataset_node_id, )