|
@@ -980,7 +980,6 @@ class TestWorkspaceMembersEndpoint(FunctionalTest):
|
980
|
980
|
'user_id': 2,
|
981
|
981
|
'user_email_or_public_name': None,
|
982
|
982
|
'role': 'content-manager',
|
983
|
|
- 'do_notify': False,
|
984
|
983
|
}
|
985
|
984
|
res = self.testapp.post_json(
|
986
|
985
|
'/api/v2/workspaces/1/members',
|
|
@@ -1023,7 +1022,6 @@ class TestWorkspaceMembersEndpoint(FunctionalTest):
|
1023
|
1022
|
'user_id': None,
|
1024
|
1023
|
'user_email_or_public_name': 'lawrence-not-real-email@fsf.local',
|
1025
|
1024
|
'role': 'content-manager',
|
1026
|
|
- 'do_notify': 'True',
|
1027
|
1025
|
}
|
1028
|
1026
|
res = self.testapp.post_json(
|
1029
|
1027
|
'/api/v2/workspaces/1/members',
|
|
@@ -1036,7 +1034,7 @@ class TestWorkspaceMembersEndpoint(FunctionalTest):
|
1036
|
1034
|
assert user_role_found['workspace_id'] == 1
|
1037
|
1035
|
assert user_role_found['newly_created'] is False
|
1038
|
1036
|
assert user_role_found['email_sent'] is False
|
1039
|
|
- assert user_role_found['do_notify'] is True
|
|
1037
|
+ assert user_role_found['do_notify'] is False
|
1040
|
1038
|
|
1041
|
1039
|
res = self.testapp.get('/api/v2/workspaces/1/members', status=200).json_body # nopep8
|
1042
|
1040
|
assert len(res) == 2
|
|
@@ -1066,7 +1064,6 @@ class TestWorkspaceMembersEndpoint(FunctionalTest):
|
1066
|
1064
|
'user_id': None,
|
1067
|
1065
|
'user_email_or_public_name': 'Lawrence L.',
|
1068
|
1066
|
'role': 'content-manager',
|
1069
|
|
- 'do_notify': True,
|
1070
|
1067
|
}
|
1071
|
1068
|
res = self.testapp.post_json(
|
1072
|
1069
|
'/api/v2/workspaces/1/members',
|
|
@@ -1079,7 +1076,7 @@ class TestWorkspaceMembersEndpoint(FunctionalTest):
|
1079
|
1076
|
assert user_role_found['workspace_id'] == 1
|
1080
|
1077
|
assert user_role_found['newly_created'] is False
|
1081
|
1078
|
assert user_role_found['email_sent'] is False
|
1082
|
|
- assert user_role_found['do_notify'] is True
|
|
1079
|
+ assert user_role_found['do_notify'] is False
|
1083
|
1080
|
|
1084
|
1081
|
res = self.testapp.get('/api/v2/workspaces/1/members', status=200).json_body # nopep8
|
1085
|
1082
|
assert len(res) == 2
|
|
@@ -1109,7 +1106,6 @@ class TestWorkspaceMembersEndpoint(FunctionalTest):
|
1109
|
1106
|
'user_id': None,
|
1110
|
1107
|
'user_email_or_public_name': None,
|
1111
|
1108
|
'role': 'content-manager',
|
1112
|
|
- 'do_notify': True,
|
1113
|
1109
|
}
|
1114
|
1110
|
res = self.testapp.post_json(
|
1115
|
1111
|
'/api/v2/workspaces/1/members',
|
|
@@ -1134,7 +1130,6 @@ class TestWorkspaceMembersEndpoint(FunctionalTest):
|
1134
|
1130
|
'user_id': 47,
|
1135
|
1131
|
'user_email_or_public_name': None,
|
1136
|
1132
|
'role': 'content-manager',
|
1137
|
|
- 'do_notify': True,
|
1138
|
1133
|
}
|
1139
|
1134
|
res = self.testapp.post_json(
|
1140
|
1135
|
'/api/v2/workspaces/1/members',
|
|
@@ -1159,7 +1154,6 @@ class TestWorkspaceMembersEndpoint(FunctionalTest):
|
1159
|
1154
|
'user_id': None,
|
1160
|
1155
|
'user_email_or_public_name': 'nothing@nothing.nothing',
|
1161
|
1156
|
'role': 'content-manager',
|
1162
|
|
- 'do_notify': True,
|
1163
|
1157
|
}
|
1164
|
1158
|
res = self.testapp.post_json(
|
1165
|
1159
|
'/api/v2/workspaces/1/members',
|
|
@@ -1173,7 +1167,7 @@ class TestWorkspaceMembersEndpoint(FunctionalTest):
|
1173
|
1167
|
assert user_role_found['workspace_id'] == 1
|
1174
|
1168
|
assert user_role_found['newly_created'] is True
|
1175
|
1169
|
assert user_role_found['email_sent'] is False
|
1176
|
|
- assert user_role_found['do_notify'] is True
|
|
1170
|
+ assert user_role_found['do_notify'] is False
|
1177
|
1171
|
|
1178
|
1172
|
res = self.testapp.get('/api/v2/workspaces/1/members',
|
1179
|
1173
|
status=200).json_body # nopep8
|
|
@@ -1205,10 +1199,10 @@ class TestWorkspaceMembersEndpoint(FunctionalTest):
|
1205
|
1199
|
assert user_role['role'] == 'workspace-manager'
|
1206
|
1200
|
assert user_role['user_id'] == 1
|
1207
|
1201
|
assert user_role['workspace_id'] == 1
|
|
1202
|
+ assert user_role['do_notify'] is True
|
1208
|
1203
|
# update workspace role
|
1209
|
1204
|
params = {
|
1210
|
1205
|
'role': 'content-manager',
|
1211
|
|
- 'do_notify': False,
|
1212
|
1206
|
}
|
1213
|
1207
|
res = self.testapp.put_json(
|
1214
|
1208
|
'/api/v2/workspaces/1/members/1',
|
|
@@ -1224,7 +1218,7 @@ class TestWorkspaceMembersEndpoint(FunctionalTest):
|
1224
|
1218
|
assert len(res) == 1
|
1225
|
1219
|
user_role = res[0]
|
1226
|
1220
|
assert user_role['role'] == 'content-manager'
|
1227
|
|
- assert user_role['do_notify'] is False
|
|
1221
|
+ assert user_role['do_notify'] is True
|
1228
|
1222
|
assert user_role['user_id'] == 1
|
1229
|
1223
|
assert user_role['workspace_id'] == 1
|
1230
|
1224
|
|
|
@@ -1367,7 +1361,6 @@ class TestUserInvitationWithMailActivatedSync(FunctionalTest):
|
1367
|
1361
|
'user_id': None,
|
1368
|
1362
|
'user_email_or_public_name': 'bob@bob.bob',
|
1369
|
1363
|
'role': 'content-manager',
|
1370
|
|
- 'do_notify': True,
|
1371
|
1364
|
}
|
1372
|
1365
|
res = self.testapp.post_json(
|
1373
|
1366
|
'/api/v2/workspaces/1/members',
|
|
@@ -1381,7 +1374,7 @@ class TestUserInvitationWithMailActivatedSync(FunctionalTest):
|
1381
|
1374
|
assert user_role_found['workspace_id'] == 1
|
1382
|
1375
|
assert user_role_found['newly_created'] is True
|
1383
|
1376
|
assert user_role_found['email_sent'] is True
|
1384
|
|
- assert user_role_found['do_notify'] is True
|
|
1377
|
+ assert user_role_found['do_notify'] is False
|
1385
|
1378
|
|
1386
|
1379
|
# check mail received
|
1387
|
1380
|
response = requests.get('http://127.0.0.1:8025/api/v1/messages')
|
|
@@ -1418,7 +1411,6 @@ class TestUserInvitationWithMailActivatedASync(FunctionalTest):
|
1418
|
1411
|
'user_id': None,
|
1419
|
1412
|
'user_email_or_public_name': 'bob@bob.bob',
|
1420
|
1413
|
'role': 'content-manager',
|
1421
|
|
- 'do_notify': True,
|
1422
|
1414
|
}
|
1423
|
1415
|
res = self.testapp.post_json(
|
1424
|
1416
|
'/api/v2/workspaces/1/members',
|