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 6
6
import pytest
7
7
8
8
from jbi .actions import default
9
+ from jbi .environment import get_settings
9
10
from jbi .models import ActionContext
10
11
from jbi .services .jira import JiraCreateError
11
12
from tests .fixtures .factories import comment_factory
@@ -55,7 +56,7 @@ def test_created_public(
55
56
)
56
57
57
58
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" ]}
59
60
)
60
61
61
62
Original file line number Diff line number Diff line change 5
5
from fastapi .testclient import TestClient
6
6
7
7
from jbi .app import app
8
+ from jbi .environment import get_settings
8
9
from jbi .models import BugzillaWebhookRequest
9
10
10
11
@@ -13,7 +14,7 @@ def test_read_root(anon_client):
13
14
resp = anon_client .get ("/" )
14
15
infos = resp .json ()
15
16
16
- assert "atlassian.net" in infos ["configuration" ]["jira_base_url" ]
17
+ assert get_settings (). jira_base_url in infos ["configuration" ]["jira_base_url" ]
17
18
18
19
19
20
def test_whiteboard_tags (anon_client ):
@@ -72,7 +73,7 @@ def test_webhook_is_200_if_action_succeeds(
72
73
{
73
74
"changes" : {
74
75
"see_also" : {
75
- "added" : "https://mozilla.atlassian.net/ browse/JBI-1922" ,
76
+ "added" : f" { get_settings (). jira_base_url } browse/JBI-1922" ,
76
77
"removed" : "" ,
77
78
}
78
79
},
@@ -85,7 +86,7 @@ def test_webhook_is_200_if_action_succeeds(
85
86
}
86
87
mocked_jira .create_or_update_issue_remote_links .return_value = {
87
88
"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" ,
89
90
}
90
91
91
92
with TestClient (app ) as anon_client :
Original file line number Diff line number Diff line change 9
9
import pytest
10
10
11
11
from jbi import Operation
12
- from jbi .environment import Settings
12
+ from jbi .environment import Settings , get_settings
13
13
from jbi .errors import IgnoreInvalidRequestError
14
14
from jbi .models import Actions , BugzillaBug , BugzillaWebhookRequest
15
15
from jbi .runner import execute_action
@@ -25,7 +25,7 @@ def test_bugzilla_object_is_always_fetched(
25
25
# See https://github.com/mozilla/jira-bugzilla-integration/issues/292
26
26
fetched_bug = bug_factory (
27
27
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" ],
29
29
)
30
30
mocked_bugzilla .get_bug .return_value = fetched_bug
31
31
You can’t perform that action at this time.
0 commit comments