File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 66import pytest
77
88from jbi .actions import default
9+ from jbi .environment import get_settings
910from jbi .models import ActionContext
1011from jbi .services .jira import JiraCreateError
1112from tests .fixtures .factories import comment_factory
@@ -55,7 +56,7 @@ def test_created_public(
5556 )
5657
5758 mocked_bugzilla .update_bug .assert_called_once_with (
58- 654321 , see_also = {"add" : ["https://mozit-test.atlassian.net/ browse/k" ]}
59+ 654321 , see_also = {"add" : [f" { get_settings (). jira_base_url } browse/k" ]}
5960 )
6061
6162
Original file line number Diff line number Diff line change 55from fastapi .testclient import TestClient
66
77from jbi .app import app
8+ from jbi .environment import get_settings
89from jbi .models import BugzillaWebhookRequest
910
1011
@@ -13,7 +14,7 @@ def test_read_root(anon_client):
1314 resp = anon_client .get ("/" )
1415 infos = resp .json ()
1516
16- assert "atlassian.net" in infos ["configuration" ]["jira_base_url" ]
17+ assert get_settings (). jira_base_url in infos ["configuration" ]["jira_base_url" ]
1718
1819
1920def test_whiteboard_tags (anon_client ):
@@ -72,7 +73,7 @@ def test_webhook_is_200_if_action_succeeds(
7273 {
7374 "changes" : {
7475 "see_also" : {
75- "added" : "https://mozilla.atlassian.net/ browse/JBI-1922" ,
76+ "added" : f" { get_settings (). jira_base_url } browse/JBI-1922" ,
7677 "removed" : "" ,
7778 }
7879 },
@@ -85,7 +86,7 @@ def test_webhook_is_200_if_action_succeeds(
8586 }
8687 mocked_jira .create_or_update_issue_remote_links .return_value = {
8788 "id" : 18936 ,
88- "self" : "https://mozilla.atlassian.net/ rest/api/2/issue/JBI-1922/remotelink/18936" ,
89+ "self" : f" { get_settings (). jira_base_url } rest/api/2/issue/JBI-1922/remotelink/18936" ,
8990 }
9091
9192 with TestClient (app ) as anon_client :
Original file line number Diff line number Diff line change 99import pytest
1010
1111from jbi import Operation
12- from jbi .environment import Settings
12+ from jbi .environment import Settings , get_settings
1313from jbi .errors import IgnoreInvalidRequestError
1414from jbi .models import Actions , BugzillaBug , BugzillaWebhookRequest
1515from jbi .runner import execute_action
@@ -25,7 +25,7 @@ def test_bugzilla_object_is_always_fetched(
2525 # See https://github.com/mozilla/jira-bugzilla-integration/issues/292
2626 fetched_bug = bug_factory (
2727 id = webhook_create_example .bug .id ,
28- see_also = ["https://mozilla.atlassian.net/ browse/JBI-234" ],
28+ see_also = [f" { get_settings (). jira_base_url } browse/JBI-234" ],
2929 )
3030 mocked_bugzilla .get_bug .return_value = fetched_bug
3131
You can’t perform that action at this time.
0 commit comments