mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 03:41:08 +00:00
Add team privacy parameter to create team (#702)
* Add team privacy and add additional parameter to test. Still requires replaydata * Reorder parameters to not break existing code * Update tests for #702
This commit is contained in:
@@ -101,7 +101,7 @@ class Organization(Framework.TestCase):
|
||||
|
||||
def testCreateTeamWithAllArguments(self):
|
||||
repo = self.org.get_repo("FatherBeaver")
|
||||
team = self.org.create_team("Team also created by PyGithub", [repo], "push")
|
||||
team = self.org.create_team("Team also created by PyGithub", [repo], "push", "secret")
|
||||
self.assertEqual(team.id, 189852)
|
||||
|
||||
def testDeleteHook(self):
|
||||
|
||||
@@ -15,8 +15,7 @@ api.github.com
|
||||
None
|
||||
/orgs/BeaverSoftware/teams
|
||||
{'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
{"repo_names": ["BeaverSoftware/FatherBeaver"], "name": "Team also created by PyGithub", "permission": "push"}
|
||||
{"repo_names": ["BeaverSoftware/FatherBeaver"], "name": "Team also created by PyGithub", "permission": "push", "privacy": "secret"}
|
||||
201
|
||||
[('status', '201 Created'), ('x-ratelimit-remaining', '4982'), ('content-length', '150'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"6e3fb00de6ca4c112feee3a1438d6f0e"'), ('date', 'Sat, 26 May 2012 21:00:26 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/teams/189852')]
|
||||
{"repos_count":1,"url":"https://api.github.com/teams/189852","members_count":0,"name":"Team also created by PyGithub","permission":"push","id":189852}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user