File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ def test_default_returns_callable_with_data(
47
47
def test_created_public (
48
48
webhook_create_example : BugzillaWebhookRequest , mocked_jira , mocked_bugzilla
49
49
):
50
+ mocked_jira .create_issue .return_value = {"key" : "new-id" }
50
51
mocked_bugzilla .get_bug .return_value = webhook_create_example .bug
51
52
mocked_bugzilla .get_comments .return_value = [
52
53
comment_factory (text = "Initial comment" )
@@ -65,6 +66,10 @@ def test_created_public(
65
66
},
66
67
)
67
68
69
+ mocked_bugzilla .update_bug .assert_called_once_with (
70
+ 654321 , see_also = {"add" : ["https://mozit-test.atlassian.net/browse/new-id" ]}
71
+ )
72
+
68
73
69
74
def test_modified_public (webhook_modify_example : BugzillaWebhookRequest , mocked_jira ):
70
75
assert webhook_modify_example .bug
Original file line number Diff line number Diff line change @@ -84,9 +84,12 @@ def test_bugzilla_update_bug_uses_a_put(mocked_responses):
84
84
url = f"{ get_settings ().bugzilla_base_url } /rest/bug/42"
85
85
mocked_responses .add (responses .PUT , url , json = {"bugs" : [{"id" : 42 }]})
86
86
87
- get_client ().update_bug (42 , see_also = " http://url.com" )
87
+ get_client ().update_bug (42 , see_also = { "add" : [ " http://url.com"]} )
88
88
89
- assert mocked_responses .calls [0 ].request .body == b'{"see_also": "http://url.com"}'
89
+ assert (
90
+ mocked_responses .calls [0 ].request .body
91
+ == b'{"see_also": {"add": ["http://url.com"]}}'
92
+ )
90
93
91
94
92
95
@pytest .mark .no_mocked_bugzilla
You can’t perform that action at this time.
0 commit comments