def test_creation_from_scratch(self, client, created_entities): dataset = Dataset(client._conn, client._conf, dataset_type=_DatasetService.DatasetTypeEnum.DatasetType.QUERY) created_entities.append(dataset) version = DatasetVersion(client._conn, client._conf, dataset_id=dataset.id, dataset_version_info=_DatasetVersionService.QueryDatasetVersionInfo(), dataset_type=_DatasetService.DatasetTypeEnum.QUERY) assert version.id
def test_creation_from_scratch(self, client): name = utils.gen_str() dataset = Dataset(client._conn, client._conf, name=name, dataset_type=_DatasetService.DatasetTypeEnum.DatasetType.QUERY) version = DatasetVersion(client._conn, client._conf, dataset_id=dataset.id, dataset_version_info=_DatasetVersionService.QueryDatasetVersionInfo(), dataset_type=_DatasetService.DatasetTypeEnum.QUERY) assert version.dataset_type == _DatasetService.DatasetTypeEnum.QUERY assert version.id
def test_creation_by_id(self, client, created_datasets): dataset = Dataset(client._conn, client._conf, dataset_type=_DatasetService.DatasetTypeEnum.QUERY) created_datasets.append(dataset) version = DatasetVersion(client._conn, client._conf, dataset_id=dataset.id, dataset_version_info=_DatasetVersionService.QueryDatasetVersionInfo(), dataset_type=_DatasetService.DatasetTypeEnum.QUERY) assert version.id same_version = DatasetVersion(client._conn, client._conf, _dataset_version_id=version.id) assert version.id == same_version.id