MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / testCreateCheckRunCompleted

Method testCreateCheckRunCompleted

tests/CheckRun.py:162–221  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

160 self.assertEqual(check_run.status, "completed")
161
162 def testCreateCheckRunCompleted(self):
163 check_run = self.testrepo.create_check_run(
164 name="completed_check_run",
165 head_sha="0283d46537193f1fed7d46859f15c5304b9836f9",
166 status="completed",
167 started_at=datetime(2020, 10, 20, 10, 30, 29),
168 conclusion="success",
169 completed_at=datetime(2020, 10, 20, 11, 30, 50),
170 output={
171 "title": "Readme report",
172 "summary": "There are 0 failures, 2 warnings, and 1 notices.",
173 "text": "You may have some misspelled words on lines 2 and 4.",
174 "annotations": [
175 {
176 "path": "README.md",
177 "annotation_level": "warning",
178 "title": "Spell Checker",
179 "message": "Check your spelling for 'banaas'.",
180 "raw_details": "Do you mean 'bananas' or 'banana'?",
181 "start_line": 2,
182 "end_line": 2,
183 },
184 {
185 "path": "README.md",
186 "annotation_level": "warning",
187 "title": "Spell Checker",
188 "message": "Check your spelling for 'aples'",
189 "raw_details": "Do you mean 'apples' or 'Naples'",
190 "start_line": 4,
191 "end_line": 4,
192 },
193 ],
194 "images": [
195 {
196 "alt": "Test Image",
197 "image_url": "http://example.com/images/42",
198 }
199 ],
200 },
201 actions=[
202 {
203 "label": "Fix",
204 "identifier": "fix_errors",
205 "description": "Allow us to fix these errors for you",
206 }
207 ],
208 )
209 self.assertEqual(check_run.name, "completed_check_run")
210 self.assertEqual(check_run.head_sha, "0283d46537193f1fed7d46859f15c5304b9836f9")
211 self.assertEqual(check_run.status, "completed")
212 self.assertEqual(
213 check_run.started_at,
214 datetime(2020, 10, 20, 10, 30, 29, tzinfo=timezone.utc),
215 ),
216 self.assertEqual(check_run.conclusion, "success")
217 self.assertEqual(
218 check_run.completed_at,
219 datetime(2020, 10, 20, 11, 30, 50, tzinfo=timezone.utc),

Callers

nothing calls this directly

Calls 1

create_check_runMethod · 0.80

Tested by

no test coverage detected