Skip to content

Commit

Permalink
fixing test I broke earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
danbrauer committed Nov 13, 2024
1 parent 9270e36 commit a24ad15
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
FAKE_GITHUB_ORG_DATA = {
'url': 'https://example.com/my_org',
'login': 'my_org',
}

FAKE_GITHUB_USER_DATA = [
{
'MEMBER_OF': FAKE_GITHUB_ORG_DATA['url'],
'hasTwoFactorEnabled': None,
'node': {
'url': 'https://example.com/hjsimpson',
'login': 'HjsimPson', # Upper and lowercase
'name': 'Homer Simpson',
'isSiteAdmin': False,
'email': '[email protected]',
'company': 'Springfield Nuclear Power Plant',
},
'url': 'https://example.com/hjsimpson',
'login': 'HjsimPson', # Upper and lowercase
'name': 'Homer Simpson',
'isSiteAdmin': False,
'isEnterpriseOwner': False,
'email': '[email protected]',
'company': 'Springfield Nuclear Power Plant',
'role': 'MEMBER',
}, {
'MEMBER_OF': FAKE_GITHUB_ORG_DATA['url'],
'hasTwoFactorEnabled': None,
'node': {
'url': 'https://example.com/mbsimpson',
'login': 'mbsimp-son', # All lowercase
'name': 'Marge Simpson',
'isSiteAdmin': False,
'email': '[email protected]',
'company': 'Simpson Residence',
},
'url': 'https://example.com/mbsimpson',
'login': 'mbsimp-son', # All lowercase
'name': 'Marge Simpson',
'isEnterpriseOwner': True,
'isSiteAdmin': False,
'email': '[email protected]',
'company': 'Simpson Residence',
'role': 'ADMIN',
},
]

FAKE_GITHUB_ORG_DATA = {
'url': 'https://example.com/my_org',
'login': 'my_org',
}

FAKE_EMPLOYEE_DATA = [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from cartography.client.core.tx import load
from cartography.intel.github.users import load_users
from cartography.models.core.nodes import CartographyNodeSchema
from cartography.models.github.users import GitHubOrganizationUserSchema
from tests.data.graph.querybuilder.sample_data.case_insensitive_prop_ref import FAKE_EMPLOYEE_DATA
from tests.data.graph.querybuilder.sample_data.case_insensitive_prop_ref import FAKE_GITHUB_ORG_DATA
from tests.data.graph.querybuilder.sample_data.case_insensitive_prop_ref import FAKE_GITHUB_USER_DATA
Expand All @@ -14,7 +14,7 @@ def test_load_team_members_data(neo4j_session):
# Arrange: Load some fake GitHubUser nodes to the graph
load_users(
neo4j_session,
CartographyNodeSchema(),
GitHubOrganizationUserSchema(),
FAKE_GITHUB_USER_DATA,
FAKE_GITHUB_ORG_DATA,
TEST_UPDATE_TAG,
Expand Down

0 comments on commit a24ad15

Please sign in to comment.