mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
Labels API: support description (#738)
The description attribute handling requirement is
a custom media type in the Accept header:
application/vnd.github.symmetra-preview+json
Limitation: Repository.get_labels does not report description,
possibly something has changed in the preview API.
This commit is contained in:
committed by
Wan Liuyang
parent
6bf2acc74d
commit
42e7593871
@@ -226,8 +226,9 @@ class Repository(Framework.TestCase):
|
||||
self.assertEqual(issue.number, 30)
|
||||
|
||||
def testCreateLabel(self):
|
||||
label = self.repo.create_label("Label with silly name % * + created by PyGithub", "00ff00")
|
||||
label = self.repo.create_label("Label with silly name % * + created by PyGithub", "00ff00", "Description of label with silly name")
|
||||
self.assertEqual(label.color, "00ff00")
|
||||
self.assertEqual(label.description, "Description of label with silly name")
|
||||
self.assertEqual(label.name, "Label with silly name % * + created by PyGithub")
|
||||
self.assertEqual(label.url, "https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+silly+name+%25+%2A+%2B+created+by+PyGithub")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user