-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Daniel Brauer <[email protected]>
- Loading branch information
Showing
3 changed files
with
144 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
GITHUB_USER_DATA = [ | ||
GITHUB_ORG_DATA = { | ||
'url': 'https://example.com/my_org', | ||
'login': 'my_org', | ||
} | ||
|
||
|
||
GITHUB_USER_DATA = ([ | ||
{ | ||
'hasTwoFactorEnabled': None, | ||
'node': { | ||
|
@@ -12,6 +18,17 @@ | |
'role': 'MEMBER', | ||
}, { | ||
'hasTwoFactorEnabled': None, | ||
'node': { | ||
'url': 'https://example.com/lmsimpson', | ||
'login': 'lmsimpson', | ||
'name': 'Lisa Simpson', | ||
'isSiteAdmin': False, | ||
'email': '[email protected]', | ||
'company': 'Simpson Residence', | ||
}, | ||
'role': 'MEMBER', | ||
}, { | ||
'hasTwoFactorEnabled': True, | ||
'node': { | ||
'url': 'https://example.com/mbsimpson', | ||
'login': 'mbsimpson', | ||
|
@@ -21,16 +38,16 @@ | |
'company': 'Simpson Residence', | ||
}, | ||
'role': 'ADMIN', | ||
}, | ||
] | ||
}], | ||
GITHUB_ORG_DATA | ||
) | ||
|
||
# Note the subtle differences between owner data and user data: | ||
# Subtle differences between owner data and user data: | ||
# 1. owner data does not include a `hasTwoFactorEnabled` field (it in unavailable in the GraphQL query for these owners) | ||
# 2. an `organizationRole` field instead of a `role` field. For user data, membership in the queried org | ||
# is assumed. The owner data, membership is not assumed, so there is an 'UNAFFILIATED' value for owners who are | ||
# not also users in an organization. In this list, the 'OWNER' organizationRole matches the 'ADMIN' role in the | ||
# user data. Similarly, the 'DIRECT_MEMBER' organizationRole matches the 'MEMBER' role. | ||
GITHUB_ENTERPRISE_OWNER_DATA = [ # TODO put in real fake values for testing | ||
# 2. an `organizationRole` field instead of a `role` field. In owner data, membership within an org is not assumed, so | ||
# there is an 'UNAFFILIATED' value for owners of an org who are not also members of it. (Otherwise the 'OWNER' | ||
# organizationRole matches the 'ADMIN' role in the user data, and the 'DIRECT_MEMBER' organizationRole matches the 'MEMBER' role.) | ||
GITHUB_ENTERPRISE_OWNER_DATA = ([ | ||
{ | ||
'node': { | ||
'url': 'https://example.com/kbroflovski', | ||
|
@@ -43,14 +60,14 @@ | |
'organizationRole': 'UNAFFILIATED', | ||
}, { | ||
'node': { | ||
'url': 'https://example.com/bjsimpson', | ||
'login': 'bjsimpson', | ||
'name': 'Bartholomew Simpson', | ||
'url': 'https://example.com/mbsimpson', | ||
'login': 'mbsimpson', | ||
'name': 'Marge Simpson', | ||
'isSiteAdmin': False, | ||
'email': 'bjsimpson@example.com', | ||
'email': 'mbsimpson@example.com', | ||
'company': 'Simpson Residence', | ||
}, | ||
'organizationRole': 'DIRECT_MEMBER', | ||
'organizationRole': 'OWNER', | ||
}, { | ||
'node': { | ||
'url': 'https://example.com/lmsimpson', | ||
|
@@ -60,11 +77,8 @@ | |
'email': '[email protected]', | ||
'company': 'Simpson Residence', | ||
}, | ||
'organizationRole': 'OWNER', | ||
}, | ||
] | ||
'organizationRole': 'DIRECT_MEMBER', | ||
}], | ||
GITHUB_ORG_DATA | ||
) | ||
|
||
GITHUB_ORG_DATA = { | ||
'url': 'https://example.com/my_org', | ||
'login': 'my_org', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters