diff --git a/tests/data/graph/querybuilder/sample_data/case_insensitive_prop_ref.py b/tests/data/graph/querybuilder/sample_data/case_insensitive_prop_ref.py index 21e53c6fd7..5262f52ac8 100644 --- a/tests/data/graph/querybuilder/sample_data/case_insensitive_prop_ref.py +++ b/tests/data/graph/querybuilder/sample_data/case_insensitive_prop_ref.py @@ -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': 'hjsimpson@example.com', - 'company': 'Springfield Nuclear Power Plant', - }, + 'url': 'https://example.com/hjsimpson', + 'login': 'HjsimPson', # Upper and lowercase + 'name': 'Homer Simpson', + 'isSiteAdmin': False, + 'isEnterpriseOwner': False, + 'email': 'hjsimpson@example.com', + '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': 'mbsimpson@example.com', - 'company': 'Simpson Residence', - }, + 'url': 'https://example.com/mbsimpson', + 'login': 'mbsimp-son', # All lowercase + 'name': 'Marge Simpson', + 'isEnterpriseOwner': True, + 'isSiteAdmin': False, + 'email': 'mbsimpson@example.com', + 'company': 'Simpson Residence', 'role': 'ADMIN', }, ] -FAKE_GITHUB_ORG_DATA = { - 'url': 'https://example.com/my_org', - 'login': 'my_org', -} FAKE_EMPLOYEE_DATA = [ { diff --git a/tests/integration/cartography/graph/test_querybuilder_case_insensitive.py b/tests/integration/cartography/graph/test_querybuilder_case_insensitive.py index 70c8b97676..edb9b6c008 100644 --- a/tests/integration/cartography/graph/test_querybuilder_case_insensitive.py +++ b/tests/integration/cartography/graph/test_querybuilder_case_insensitive.py @@ -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 @@ -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,