-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding tests for samplesheets config.
- Loading branch information
Showing
2 changed files
with
57 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
from types import SimpleNamespace | ||
|
||
from sodar_cli.common import CommonConfig | ||
from sodar_cli.samplesheet import config | ||
|
||
import pytest | ||
|
||
|
||
@pytest.fixture | ||
def args(): | ||
return SimpleNamespace( | ||
verbose=False, | ||
verify_ssl=True, | ||
sodar_api_token="XXX", | ||
sodar_server_url="https://sodar.example.com/", | ||
project_uuid="123", | ||
file_paths=[], | ||
md5_sum="asdf", | ||
) | ||
|
||
|
||
@pytest.fixture | ||
def common_config(args): | ||
return CommonConfig.create(args) | ||
|
||
|
||
@pytest.fixture | ||
def project_config(args, common_config): | ||
return config.SampleSheetConfig.create(args, common_config) | ||
|
||
|
||
def test_samplesheet_retrieve_config(args, common_config): | ||
config.SampleSheetRetrieveConfig.create(args, common_config) | ||
|
||
|
||
def test_samplesheet_import_config(args, common_config): | ||
config.SampleSheetImportConfig.create(args, common_config) | ||
|
||
|
||
def test_samplesheet_export_config(args, common_config): | ||
config.SampleSheetExportConfig.create(args, common_config) | ||
|
||
|
||
def test_sample_data_file_exists_config(args, common_config): | ||
config.SampleDataFileExistsConfig.create(args, common_config) |