Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
111 changed files
with
7,127 additions
and
7,105 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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 @@ | ||
import uuid | ||
|
||
from analysis_manager.models import AnalysisStatus | ||
from analysis_manager.tests import AnalysisManagerTestBase | ||
|
||
|
||
# models | ||
class AnalysisStatusTests(AnalysisManagerTestBase): | ||
def test_set_galaxy_history_state_with_valid_state(self): | ||
self.analysis_status.set_galaxy_history_state(AnalysisStatus.PROGRESS) | ||
self.assertEqual( | ||
self.analysis_status.galaxy_history_state, | ||
AnalysisStatus.PROGRESS | ||
) | ||
|
||
def test_set_galaxy_history_state_with_invalid_state(self): | ||
with self.assertRaises(ValueError) as context: | ||
self.analysis_status.set_galaxy_history_state("NOT A VALID STATE") | ||
self.assertEqual( | ||
context.exception.message, | ||
"Invalid Galaxy history state given" | ||
) | ||
|
||
def test_set_galaxy_import_state_with_valid_state(self): | ||
self.analysis_status.set_galaxy_import_state(AnalysisStatus.PROGRESS) | ||
self.assertEqual( | ||
self.analysis_status.galaxy_import_state, | ||
AnalysisStatus.PROGRESS | ||
) | ||
|
||
def test_set_galaxy_import_state_with_invalid_state(self): | ||
with self.assertRaises(ValueError) as context: | ||
self.analysis_status.set_galaxy_import_state("NOT A VALID STATE") | ||
self.assertEqual( | ||
context.exception.message, | ||
"Invalid Galaxy history state given" | ||
) | ||
|
||
def test_set_galaxy_import_task_group_id(self): | ||
test_uuid = str(uuid.uuid4()) | ||
self.analysis_status.set_galaxy_import_task_group_id(test_uuid) | ||
self.assertEqual( | ||
self.analysis_status.galaxy_import_task_group_id, | ||
test_uuid | ||
) |
Oops, something went wrong.