def test_should_return_messages_if_present(self): """... it should return messages, if present""" account = MailTm().get_account() send_test_email(account.address) messages = [] while len(messages) == 0: sleep(1) messages = account.get_messages() message = messages[0] assert type(message) is Message assert message.subject == "subject" assert message.text == "test"
def test_should_return_an_empty_list_with_no_message(self): """... it should return an empty list with no message""" account = MailTm().get_account() messages = account.get_messages() assert len(messages) == 0