Skip to content

Commit

Permalink
fix on test
Browse files Browse the repository at this point in the history
  • Loading branch information
KFilippopolitis committed Jun 25, 2024
1 parent 235e63e commit c5cf019
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
4 changes: 3 additions & 1 deletion mipdb/usecases.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,9 @@ def execute(self) -> None:
data_model_table = DataModelTable()
dataset_table = DatasetsTable()
dataset_row_columns = ["dataset_id", "data_model_id", "code", "label", "status"]
dataset_rows = dataset_table.get_datasets(self.sqlite_db, columns=dataset_row_columns)
dataset_rows = dataset_table.get_datasets(
self.sqlite_db, columns=dataset_row_columns
)
data_model_fullname_by_data_model_id = {
data_model_id: get_data_model_fullname(code, version)
for data_model_id, code, version in data_model_table.get_data_models(
Expand Down
12 changes: 3 additions & 9 deletions tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,16 +334,10 @@ def test_invalid_dataset_error_cases(data_model, dataset, exception_message):
def test_validate_no_db():
runner = CliRunner()

validation_result = runner.invoke(
validate_folder,
[
ABSOLUTE_PATH_FAIL_DATA_FOLDER
]
)
validation_result = runner.invoke(validate_folder, [ABSOLUTE_PATH_FAIL_DATA_FOLDER])
assert (
"""An error occurred while validating the csv on column: 'var2'
index failure_case
0 0 l3""" in validation_result.stdout
"An error occurred while validating the csv on column: 'var2'"
in validation_result.stdout
)


Expand Down

0 comments on commit c5cf019

Please sign in to comment.