예제 #1
0
 def __init__(self):
     alice = EFBChat(self)
     alice.chat_name = "Alice"
     alice.chat_uid = "alice"
     alice.chat_type = ChatType.User
     bob = EFBChat(self)
     bob.chat_name = "Bob"
     bob.chat_alias = "Little bobby"
     bob.chat_uid = "bob"
     bob.chat_type = ChatType.User
     carol = EFBChat(self)
     carol.chat_name = "Carol"
     carol.chat_uid = "carol"
     carol.chat_type = ChatType.User
     dave = EFBChat(self)
     dave.chat_name = "デブ"  # Nah, that's a joke
     dave.chat_uid = "dave"
     dave.chat_type = ChatType.User
     wonderland = EFBChat(self)
     wonderland.chat_name = "Wonderland"
     wonderland.chat_uid = "wonderland001"
     wonderland.chat_type = ChatType.Group
     wonderland.members = [bob.copy(), carol.copy(), dave.copy()]
     for i in wonderland.members:
         i.group = wonderland
         i.is_chat = False
     self.chats: List[EFBChat] = [alice, bob, wonderland]
예제 #2
0
 def __init__(self, instance_id=None):
     super().__init__(instance_id)
     alice = EFBChat(self)
     alice.chat_name = "Alice"
     alice.chat_uid = "alice"
     alice.chat_type = ChatType.User
     self.alice = alice
     bob = EFBChat(self)
     bob.chat_name = "Bob"
     bob.chat_alias = "Little bobby"
     bob.chat_uid = "bob"
     bob.chat_type = ChatType.User
     self.bob = bob
     carol = EFBChat(self)
     carol.chat_name = "Carol"
     carol.chat_uid = "carol"
     carol.chat_type = ChatType.User
     self.carol = carol
     dave = EFBChat(self)
     dave.chat_name = "デブ"  # Nah, that's a joke
     dave.chat_uid = "dave"
     dave.chat_type = ChatType.User
     self.dave = dave
     wonderland = EFBChat(self)
     wonderland.chat_name = "Wonderland"
     wonderland.chat_uid = "wonderland001"
     wonderland.chat_type = ChatType.Group
     wonderland.members = [bob.copy(), carol.copy(), dave.copy()]
     for i in wonderland.members:
         i.group = wonderland
     self.wonderland = wonderland
     self.chats: List[EFBChat] = [alice, bob, wonderland]