Ejemplo n.º 1
0
 def add_participant_list(self, participant_list: List[str]) -> bool:
     participant_set = set(participant_list)
     if len(participant_set) != len(participant_list):
         return False
     to_add = []
     for participant in participant_list:
         if self.check_participant_exists_by_name(participant):
             return False
         to_add.append(UserData(participant))
     self.__participants.extend(to_add)
     return True
Ejemplo n.º 2
0
 def remove_participant(self, participant: str) -> bool:
     if self.check_participant_exists_by_name(participant):
         self.__participants.remove(UserData(participant))
         return True
     return False
Ejemplo n.º 3
0
 def add_participant(self, participant: str) -> bool:
     if not self.check_participant_exists_by_name(participant):
         self.__participants.append(UserData(participant))
         return True
     return False
Ejemplo n.º 4
0
 def sample_user_a(self):
     return UserData('a')
Ejemplo n.º 5
0
 def sample_user_d(self):
     return UserData('d')
Ejemplo n.º 6
0
 def sample_user_c(self):
     return UserData('c')
Ejemplo n.º 7
0
 def sample_user_b(self):
     return UserData('b')