@@ -41,13 +41,26 @@ def test_bugs(db):
4141 def dud_post (url , auth , json ):
4242 assert url == "https://api.github.com/repos/org/repo/issues"
4343 assert auth == ("user" , "token" )
44+
45+ expected_body = f"""
46+ # subject
47+ ## Description
48+ description
49+
50+ ## Results
51+ results
52+
53+ ## Diagnostics
54+ **Backend version**: `{ config ["VERSION" ]} `
55+ **Frontend version**: `frontend_version`
56+ **User Agent**: `user_agent`
57+ **Screen resolution**: 1920x1080
58+ **Page**: page
59+ **User**: <not logged in>""" .strip ()
60+
4461 assert json == {
4562 "title" : "subject" ,
46- "body" : (
47- "Subject: subject\n Description:\n description\n \n Results:\n results\n \n Backend version: "
48- + config ["VERSION" ]
49- + "\n Frontend version: frontend_version\n User Agent: user_agent\n Screen resolution: 1920x1080\n Page: page\n User: <not logged in>"
50- ),
63+ "body" : expected_body ,
5164 "labels" : ["bug tool" , "bug: triage needed" ],
5265 }
5366
@@ -88,13 +101,26 @@ def test_bugs_with_user(db):
88101 def dud_post (url , auth , json ):
89102 assert url == "https://api.github.com/repos/org/repo/issues"
90103 assert auth == ("user" , "token" )
104+
105+ expected_body = f"""
106+ # subject
107+ ## Description
108+ description
109+
110+ ## Results
111+ results
112+
113+ ## Diagnostics
114+ **Backend version**: `{ config ["VERSION" ]} `
115+ **Frontend version**: `frontend_version`
116+ **User Agent**: `user_agent`
117+ **Screen resolution**: 390x844
118+ **Page**: page
119+ **User**: [@testing_user](http://localhost:3000/user/testing_user) (1)""" .strip ()
120+
91121 assert json == {
92122 "title" : "subject" ,
93- "body" : (
94- "Subject: subject\n Description:\n description\n \n Results:\n results\n \n Backend version: "
95- + config ["VERSION" ]
96- + "\n Frontend version: frontend_version\n User Agent: user_agent\n Screen resolution: 390x844\n Page: page\n User: [@testing_user](http://localhost:3000/user/testing_user) (1)"
97- ),
123+ "body" : expected_body ,
98124 "labels" : ["bug tool" , "bug: triage needed" ],
99125 }
100126
0 commit comments