-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from tarurar/tarurar/issue68
Tarurar/issue68
- Loading branch information
Showing
5 changed files
with
107 additions
and
1 deletion.
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
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,26 @@ | ||
""" | ||
This module contains tests for the is_jira_hotfix_version | ||
function in the jira_utils module. | ||
""" | ||
|
||
from unittest.mock import Mock | ||
import pytest | ||
from jira_utils import is_jira_hotfix_version | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"version_name", | ||
[ | ||
"hotfix-1.0.0", | ||
"1.0.0-hotfix", | ||
"1.0.0-hotfix-1", | ||
"1.0.0-hotfix-2", | ||
"1.0.0-hotfix-3", | ||
"1.0.0-HoTfIx-4", | ||
"hotfiX", | ||
], | ||
) | ||
def test_when_version_name_contains_hotfix(version_name): | ||
version = Mock() | ||
version.name = version_name | ||
assert is_jira_hotfix_version(version) |
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,19 @@ | ||
""" | ||
This module contains tests for the jira_utils module functions | ||
which are used to work with versions. | ||
""" | ||
|
||
from unittest.mock import Mock | ||
from jira_utils import is_jira_released_version | ||
|
||
|
||
def test_when_version_is_not_released(): | ||
version = Mock() | ||
version.released = False | ||
assert not is_jira_released_version(version) | ||
|
||
|
||
def test_when_version_is_released(): | ||
version = Mock() | ||
version.released = True | ||
assert is_jira_released_version(version) |