File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed
src/superannotate/lib/core/usecases
tests/integration/work_management Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ minversion = 3.7
33log_cli =true
44python_files = test_*.py
55; pytest_plugins = ['pytest_profiling']
6- addopts = -n 6 --dist loadscope
6+ ; addopts = -n 6 --dist loadscope
Original file line number Diff line number Diff line change @@ -860,12 +860,11 @@ def execute(self):
860860 project_id = self ._project .id ,
861861 ).data
862862 project_emails = {user .email for user in project_users }
863- users = self ._service_provider .work_management .list_users (EmptyQuery ()).data
864- pending_invitations = []
863+ users = self ._service_provider .work_management .list_users (
864+ EmptyQuery (), parent_entity = CustomFieldEntityEnum .TEAM
865+ ).data
865866 for user in users :
866- if user .state == WMUserStateEnum .Pending .value :
867- pending_invitations .append (user )
868- elif user .role == constants .UserRole .CONTRIBUTOR .value :
867+ if user .role == constants .UserRole .CONTRIBUTOR .value :
869868 team_users .add (user .email )
870869
871870 role_email_map = defaultdict (list )
Original file line number Diff line number Diff line change 1+ import pytest
12from superannotate import SAClient
23from tests .integration .base import BaseTestCase
34
@@ -22,6 +23,14 @@ def setUp(self):
2223 self .PROJECT_NAME , [scapegoat ["email" ]], "Annotator"
2324 )
2425
26+ @pytest .mark .skip (reason = "For not send real email" )
27+ def test_pending_users (self ):
28+ test_email = "test@superannotate.com"
29+ sa .invite_contributors_to_team (emails = [test_email ])
30+ sa .add_contributors_to_project (self .PROJECT_NAME , [test_email ], "Annotator" )
31+ project = sa .get_project_metadata (self .PROJECT_NAME , include_contributors = True )
32+ assert project ['contributors' ][1 ]["state" ] == "Pending"
33+
2534 def test_list_users_by_project_name (self ):
2635 project_users = sa .list_users (project = self .PROJECT_NAME )
2736 assert len (project_users ) == 1
You can’t perform that action at this time.
0 commit comments