Source code for evennia.contrib.game_systems.mail.tests

Test mail contrib


from evennia.commands.default.tests import BaseEvenniaCommandTest

from . import mail

[docs]class TestMail(BaseEvenniaCommandTest):
[docs] def test_mail(self):, "2", "'2' is not a valid mail id.", caller=self.account), "test", "'test' is not a valid mail id.", caller=self.account), "", "There are no messages in your inbox.", caller=self.account) mail.CmdMailCharacter(), "Char=Message 1", "You have received a new @mail from Char|You sent your message.", caller=self.char1, ) mail.CmdMailCharacter(), "Char=Message 2", "You sent your message.", caller=self.char2 ) mail.CmdMail(), "TestAccount2=Message 2", "You have received a new @mail from TestAccount2", caller=self.account2, ) mail.CmdMail(), "TestAccount=Message 1", "You sent your message.", caller=self.account2 ) mail.CmdMail(), "TestAccount=Message 2", "You sent your message.", caller=self.account2 ), "", "| ID From Subject", caller=self.account), "2", "From: TestAccount2", caller=self.account) mail.CmdMail(), "/forward TestAccount2 = 1/Forward message", "You sent your message.|Message forwarded.", caller=self.account, ) mail.CmdMail(), "/reply 2=Reply Message2", "You sent your message.", caller=self.account ), "/delete 2", "Message 2 deleted", caller=self.account)