コード例 #1
0
ファイル: tests.py プロジェクト: bdpdx/python-guerrillamail
class GetEmailCommandTest(TestCase):
    def setUp(self):
        self.command = GetEmailCommand()

    def test_invoke_should_format_mail(self):
        mail = Mail(
            subject='Test',
            sender='*****@*****.**',
            datetime=datetime(2014, 2, 15, 22, 2, 29),
            body='Hello'
        )
        mock_session = Mock(get_email=lambda _: mail)
        mock_args = Mock(id=1)
        output = self.command.invoke(mock_session, mock_args)
        expect(output).to.equal('From: [email protected]\nDate: {0}\nSubject: Test\n\nHello\n'.format(mail.datetime))
コード例 #2
0
class GetEmailCommandTest(TestCase):
    def setUp(self):
        self.command = GetEmailCommand()

    def test_invoke_should_format_mail(self):
        mail = Mail(subject='Test',
                    sender='*****@*****.**',
                    datetime=datetime(2014, 2, 15, 22, 2, 29),
                    body='Hello')
        mock_session = Mock(get_email=lambda _: mail)
        mock_args = Mock(id=1)
        output = self.command.invoke(mock_session, mock_args)
        expect(output).to.equal(
            'From: [email protected]\nDate: {0}\nSubject: Test\n\nHello\n'.
            format(mail.datetime))
コード例 #3
0
ファイル: tests.py プロジェクト: bdpdx/python-guerrillamail
 def setUp(self):
     self.command = GetEmailCommand()
コード例 #4
0
 def setUp(self):
     self.command = GetEmailCommand()