Exemple #1
0
 def create_messages(self):
     messages = [
         Message.create(user=self.admin, content='admin'),
         Message.create(user=self.normal, content='normal'),
     ]
     self.admin_message, self.normal_message = messages
     return messages
Exemple #2
0
 def create_message(self, user, content, **kwargs):
     return Message.create(user=user, content=content, **kwargs)