benchling_sdk.apps.config.mock_dependencies module¶
- class MockBenchlingAppConfig¶
Bases:
benchling_api_client.v2.beta.models.benchling_app_configuration.BenchlingAppConfiguration
Mock Benchling App Config.
A class extending representing a mocked Benchling app configuration.
âThe concrete mocked out values, such as API Ids and schema names are nonsensical and random, but are valid.
Code should avoid relying on specific values or conventions (such as API prefixes). If specific dependency values need to be tested in isolation, the caller can selectively override the randomized values with with_dependency().
- dependency_by_name(name: str) Optional[Union[MockDropdownDependencyLink, MockEntitySchemaDependencyLink, MockResourceDependencyLink, MockScalarConfig, MockSchemaDependencyLink, MockWorkflowTaskSchemaDependencyLink]] ¶
Return a specific dependency by name, if it exists. Only considers dependencies at the root level.
- classmethod from_manifest(manifest: benchling_api_client.v2.alpha.models.benchling_app_manifest.BenchlingAppManifest) MockBenchlingAppConfig ¶
From Manifest.
Creates a completely mocked out app config given a BenchlingAppManifest.
- with_dependency(name: str, dependency: Union[MockDropdownDependencyLink, MockEntitySchemaDependencyLink, MockResourceDependencyLink, MockScalarConfig, MockSchemaDependencyLink, MockWorkflowTaskSchemaDependencyLink]) benchling_api_client.v2.beta.models.benchling_app_configuration.BenchlingAppConfiguration ¶
Return MockBenchlingAppConfig with a specific dependency updated with the specified mock.
- class MockDropdownDependencyLink¶
Bases:
benchling_api_client.v2.beta.models.dropdown_dependency_link.DropdownDependencyLink
,benchling_sdk.apps.config.mock_dependencies.ReplaceSubdependency
Mock Dropdown Dependency Link.
- classmethod from_dependency(dependency: benchling_api_client.v2.alpha.models.dropdown_dependency.DropdownDependency) MockDropdownDependencyLink ¶
From Dependency.
Creates a mock dependency link for dropdowns and their options given a DropdownDependency definition.
Prefer this to the class constructor.
- with_subdependency(name: str, dependency: MockSubdependencyLink) MockDropdownDependencyLink ¶
Return a new dependency with a specific subdependency updated with the specified mock.
- class MockEntitySchemaDependencyLink¶
Bases:
benchling_api_client.v2.beta.models.entity_schema_dependency_link.EntitySchemaDependencyLink
,benchling_sdk.apps.config.mock_dependencies.ReplaceSubdependency
Mock Entity Schema Dependency Link.
- classmethod from_dependency(dependency: benchling_api_client.v2.alpha.models.entity_schema_dependency.EntitySchemaDependency) MockEntitySchemaDependencyLink ¶
From Dependency.
Creates a mock dependency link for entity schemas and their fields given a EntitySchemaDependency definition.
Prefer this to the class constructor.
- with_subdependency(name: str, dependency: MockSubdependencyLink) MockEntitySchemaDependencyLink ¶
Return a new dependency with a specific subdependency updated with the specified mock.
- class MockResourceDependencyLink¶
Bases:
benchling_api_client.v2.beta.models.resource_dependency_link.ResourceDependencyLink
Mock Resource Dependency Link.
- classmethod from_dependency(dependency: benchling_api_client.v2.alpha.models.resource_dependency.ResourceDependency) MockResourceDependencyLink ¶
From Dependency.
Creates a mock dependency link for resource links and their value given a ResourceDependencyLink definition.
Prefer this to the class constructor.
- class MockScalarConfig¶
Bases:
benchling_api_client.v2.beta.models.scalar_config.ScalarConfig
Mock Scalar Config.
- classmethod from_dependency(dependency: benchling_api_client.v2.alpha.models.manifest_scalar_config.ManifestScalarConfig) MockScalarConfig ¶
From Dependency.
Creates a mock dependency for scalar configs and their value given a ManifestScalarConfig definition.
Prefer this to the class constructor.
- class MockSchemaDependencyLink¶
Bases:
benchling_api_client.v2.beta.models.schema_dependency_link.SchemaDependencyLink
,benchling_sdk.apps.config.mock_dependencies.ReplaceSubdependency
Mock Schema Dependency Link.
- classmethod from_dependency(dependency: benchling_api_client.v2.alpha.models.schema_dependency.SchemaDependency) MockSchemaDependencyLink ¶
From Dependency.
Creates a mock schema dependency link for schemas and their fields given a SchemaDependencyLink definition.
Prefer this to the class constructor.
- with_subdependency(name: str, dependency: MockSubdependencyLink) MockSchemaDependencyLink ¶
Return a new dependency with a specific subdependency updated with the specified mock.
- class MockSubdependencyLink¶
Bases:
benchling_api_client.v2.beta.models.subdependency_link.SubdependencyLink
Mock Subdependency Link.
- classmethod from_dependency(dependency: benchling_api_client.v2.alpha.models.base_manifest_config.BaseManifestConfig) MockSubdependencyLink ¶
From Dependency.
Creates a mock subdependency link for subdependencies given a BaseManifestConfig definition.
Prefer this to the class constructor.
- class MockWorkflowTaskSchemaDependencyLink¶
Bases:
benchling_api_client.v2.beta.models.workflow_task_schema_dependency_link.WorkflowTaskSchemaDependencyLink
,benchling_sdk.apps.config.mock_dependencies.ReplaceSubdependency
Mock Workflow Task Schema Dependency Link.
- classmethod from_dependency(dependency: benchling_api_client.v2.alpha.models.workflow_task_schema_dependency.WorkflowTaskSchemaDependency) MockWorkflowTaskSchemaDependencyLink ¶
From Dependency.
Creates a mock workflow task schema dependency link for workflow task schemas, their outputs, and their fields given a MockWorkflowTaskSchemaDependencyLink definition.
Prefer this to the class constructor.
- with_subdependency(name: str, dependency: MockSubdependencyLink) MockWorkflowTaskSchemaDependencyLink ¶
Return a new dependency with a specific subdependency updated with the specified mock.
- class MockWorkflowTaskSchemaOutputDependency¶
Bases:
benchling_api_client.v2.beta.models.workflow_task_schema_dependency_link_output.WorkflowTaskSchemaDependencyLinkOutput
Mock Workflow Task Schema Output Dependency Link.
- classmethod from_dependency(dependency: benchling_api_client.v2.alpha.models.workflow_task_schema_dependency.WorkflowTaskSchemaDependency) MockWorkflowTaskSchemaOutputDependency ¶
From Dependency.
Creates a mock workflow task schema output dependency for workflow task schema outputs and their fields given a WorkflowTaskSchemaDependency definition.
Prefer this to the class constructor.
- class ReplaceSubdependency¶
Bases:
abc.ABC
By extending this class, a class specifies it has subdependencies which may be replaced by name.
- abstract with_subdependency(name: str, dependency: MockSubdependencyLink)¶
Return a new dependency with a specific subdependency updated with the specified mock.
- mock_dependency(dependency: Union[benchling_api_client.v2.alpha.models.dropdown_dependency.DropdownDependency, benchling_api_client.v2.alpha.models.entity_schema_dependency.EntitySchemaDependency, benchling_api_client.v2.alpha.models.manifest_scalar_config.ManifestScalarConfig, benchling_api_client.v2.alpha.models.resource_dependency.ResourceDependency, benchling_api_client.v2.alpha.models.schema_dependency.SchemaDependency, benchling_api_client.v2.alpha.models.workflow_task_schema_dependency.WorkflowTaskSchemaDependency, benchling_api_client.v2.extensions.UnknownType]) Union[MockDropdownDependencyLink, MockEntitySchemaDependencyLink, MockScalarConfig, MockResourceDependencyLink, MockSchemaDependencyLink, benchling_api_client.v2.extensions.UnknownType] ¶
Mock a dependency from its manifest definition.