Skip to content

Commit

Permalink
Flipped fixture return value, now return True if issue is open, False…
Browse files Browse the repository at this point in the history
… if resolved (as it is documented) (#83)
  • Loading branch information
liiight authored and lukas-bednar committed Jul 31, 2017
1 parent d31c80b commit 404de93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pytest_jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,6 @@ def jira_issue(request):
def wrapper_jira_issue(issue_id):
jira_plugin = getattr(request.config, '_jira', None)
if jira_plugin and jira_plugin.conn.is_connected():
return jira_plugin.is_issue_resolved(issue_id)
return not jira_plugin.is_issue_resolved(issue_id)

return wrapper_jira_issue
4 changes: 2 additions & 2 deletions tests/test_jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ def test_jira_fixture_run_positive(testdir):
import pytest
def test_pass(jira_issue):
assert not jira_issue("ORG-1382")
assert jira_issue("ORG-1382")
""")
result = testdir.runpytest(*PLUGIN_ARGS)
result.assert_outcomes(1, 0, 0)
Expand All @@ -746,7 +746,7 @@ def test_jira_fixture_run_negative(testdir):
import pytest
def test_pass(jira_issue):
assert jira_issue("ORG-1382")
assert not jira_issue("ORG-1382")
""")
result = testdir.runpytest(*PLUGIN_ARGS)
result.assert_outcomes(0, 0, 1)
Expand Down

0 comments on commit 404de93

Please sign in to comment.