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:
Mateusz Loskot
2018-03-29 18:16:20 +08:00
committed by Wan Liuyang
parent 6bf2acc74d
commit 42e7593871
7 changed files with 37 additions and 13 deletions
+2 -1
View File
@@ -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")