'Connects with POP3S and asserts the existence of an email, then deletes it'

def assertPOP3Received(self, subject):

    import poplib
    sleep(1)
    mail = poplib.POP3_SSL(TEST_SERVER, 995)
    mail.user(TEST_ADDRESS)
    mail.pass_(TEST_PASSWORD)
    num = len(mail.list()[1])
    (resp, text, octets) = mail.retr(num)
    self.assertTrue((('Subject:    ' + subject) in text))
    mail.dele(num)
    mail.quit()
