mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 11:51:10 +00:00
Allow editing of Team descriptions (#839)
PR https://github.com/PyGithub/PyGithub/pull/753 added this property but forgot to make it editable. The current PR fixes this omission.
This commit is contained in:
committed by
Wan Liuyang
parent
1d91880967
commit
c00217472b
@@ -4,8 +4,8 @@ api.github.com
|
||||
None
|
||||
/teams/189850
|
||||
{'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
{"name": "Name edited twice by PyGithub", "permission": "admin", "privacy": "secret"}
|
||||
{"name": "Name edited twice by PyGithub", "permission": "admin", "privacy": "secret", "description": "Description edited by PyGithub"}
|
||||
200
|
||||
[('status', '200 OK'), ('x-ratelimit-remaining', '4949'), ('content-length', '170'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"8856425cedbdf3075576e823f39fc3d6"'), ('date', 'Sat, 26 May 2012 21:14:46 GMT'), ('content-type', 'application/json; charset=utf-8')]
|
||||
{"permission":"admin","members_count":0,"url":"https://api.github.com/teams/189850","repos_count":0,"privacy":"secret","name":"Name edited twice by PyGithub","id":189850}
|
||||
{"permission":"admin","members_count":0,"url":"https://api.github.com/teams/189850","repos_count":0,"privacy":"secret","name":"Name edited twice by PyGithub","id":189850, "description": "Description edited by PyGithub"}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
# Copyright 2018 Isuru Fernando <isuruf@gmail.com> #
|
||||
# Copyright 2018 James D'Amato <james.j.damato@gmail.com> #
|
||||
# Copyright 2018 sfdye <tsfdye@gmail.com> #
|
||||
# Copyright 2018 Jacopo Notarstefano <jacopo.notarstefano@gmail.com> #
|
||||
# #
|
||||
# This file is part of PyGithub. #
|
||||
# http://pygithub.readthedocs.io/ #
|
||||
@@ -87,8 +88,9 @@ class Team(Framework.TestCase):
|
||||
self.assertEqual(self.team.name, "Name edited by PyGithub")
|
||||
|
||||
def testEditWithAllArguments(self):
|
||||
self.team.edit("Name edited twice by PyGithub", "admin", "secret")
|
||||
self.team.edit("Name edited twice by PyGithub", "Description edited by PyGithub", "admin", "secret")
|
||||
self.assertEqual(self.team.name, "Name edited twice by PyGithub")
|
||||
self.assertEqual(self.team.description, "Description edited by PyGithub")
|
||||
self.assertEqual(self.team.permission, "admin")
|
||||
self.assertEqual(self.team.privacy, "secret")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user