-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
39 additions
and
15 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 |
---|---|---|
|
@@ -53,6 +53,7 @@ | |
REMOTE_LEVEL_READ_INFO = SODAR_CONSTANTS['REMOTE_LEVEL_READ_INFO'] | ||
REMOTE_LEVEL_READ_ROLES = SODAR_CONSTANTS['REMOTE_LEVEL_READ_ROLES'] | ||
REMOTE_LEVEL_REVOKED = SODAR_CONSTANTS['REMOTE_LEVEL_REVOKED'] | ||
SYSTEM_USER_GROUP = SODAR_CONSTANTS['SYSTEM_USER_GROUP'] | ||
|
||
# Local constants | ||
SOURCE_SITE_NAME = 'Test source site' | ||
|
@@ -1240,6 +1241,7 @@ def test_create_local_owner(self): | |
|
||
remote_data = self.default_data | ||
remote_data['users'][SOURCE_USER_UUID]['username'] = 'source_admin' | ||
remote_data['users'][SOURCE_USER_UUID]['groups'] = [SYSTEM_USER_GROUP] | ||
remote_data['projects'][SOURCE_CATEGORY_UUID]['roles'][ | ||
SOURCE_CATEGORY_ROLE_UUID | ||
]['user'] = 'source_admin' | ||
|
@@ -1345,7 +1347,7 @@ def test_create_local_user(self): | |
'last_name': SOURCE_USER_LAST_NAME, | ||
'email': SOURCE_USER_EMAIL, | ||
'additional_emails': [], | ||
'groups': ['system'], | ||
'groups': [SYSTEM_USER_GROUP], | ||
} | ||
remote_data['projects'][SOURCE_PROJECT_UUID]['roles'][role_uuid] = { | ||
'user': local_user_username, | ||
|
@@ -1377,7 +1379,7 @@ def test_create_local_user_allow(self): | |
'last_name': SOURCE_USER_LAST_NAME, | ||
'email': SOURCE_USER_EMAIL, | ||
'additional_emails': [], | ||
'groups': ['system'], | ||
'groups': [SYSTEM_USER_GROUP], | ||
} | ||
remote_data['projects'][SOURCE_PROJECT_UUID]['roles'][role_uuid] = { | ||
'user': local_user_username, | ||
|
@@ -1407,7 +1409,7 @@ def test_create_local_user_allow_unavailable(self): | |
'last_name': SOURCE_USER_LAST_NAME, | ||
'email': SOURCE_USER_EMAIL, | ||
'additional_emails': [], | ||
'groups': ['system'], | ||
'groups': [SYSTEM_USER_GROUP], | ||
} | ||
remote_data['projects'][SOURCE_PROJECT_UUID]['roles'][role_uuid] = { | ||
'user': local_user_username, | ||
|
@@ -1438,7 +1440,7 @@ def test_create_local_owner_allow(self): | |
'last_name': SOURCE_USER_LAST_NAME, | ||
'email': SOURCE_USER_EMAIL, | ||
'additional_emails': [], | ||
'groups': ['system'], | ||
'groups': [SYSTEM_USER_GROUP], | ||
} | ||
remote_data['projects'][SOURCE_PROJECT_UUID]['roles'] = { | ||
role_uuid: { | ||
|
@@ -1473,7 +1475,7 @@ def test_create_local_owner_allow_unavailable(self): | |
'last_name': SOURCE_USER_LAST_NAME, | ||
'email': SOURCE_USER_EMAIL, | ||
'additional_emails': [], | ||
'groups': ['system'], | ||
'groups': [SYSTEM_USER_GROUP], | ||
} | ||
remote_data['projects'][SOURCE_PROJECT_UUID]['roles'] = { | ||
role_uuid: { | ||
|
@@ -1982,7 +1984,7 @@ def test_update_user_uuid_local_disallow(self): | |
'last_name': local_name.split(' ')[1], | ||
'email': '[email protected]', | ||
'additional_emails': [], | ||
'groups': [SOURCE_USER_GROUP], | ||
'groups': [SYSTEM_USER_GROUP], | ||
} | ||
self.assertEqual(User.objects.all().count(), 3) | ||
self.remote_api.sync_remote_data(self.source_site, remote_data) | ||
|