Beispiel #1
0
class MailActionsTest(unittest.TestCase):

    def setUp(self):
	self.connection = Connection()    
	self.mail_actions = MailActions()

    def test_empty_mail_list(self):

	self.assertTrue(self.mail_actions.list_mail(self.connection.connection_pop3('pop.gmail.com', '*****@*****.**', 'prueba1ab2')))
Beispiel #2
0
class ConnectionPop3Test(unittest.TestCase):
    
    def setUp(self):
        self.connection = Connection()
    
    #def test_connection_pop3_invalid_host(self):
	#self.assertEqual(self.connection.connection_pop3('kakas.e', '*****@*****.**', 'DaVinci5260'), '[Errno -2] Name or service not known')

    
    def test_connection_pop3_invalid_username(self):
		
	self.assertEqual(self.connection.connection_pop3('pop.gmail.com', '*****@*****.**', 'prueba1ab2'), '-ERR [AUTH] Username and password not accepted.')
    
    def test_connection_pop3_invalid_password(self):
	
	self.assertEqual(self.connection.connection_pop3('pop.gmail.com', '*****@*****.**', 'password'), '-ERR [AUTH] Username and password not accepted.')

    def test_connection_pop3_valid_data(self):

        self.assertTrue(self.connection.connection_pop3('pop.gmail.com', '*****@*****.**', 'prueba1ab2'))