# Path: imap_tools/utils.py
# class EmailAddress:
#     """Parsed email address info"""
#     __slots__ = 'name', 'email', 'full'
# 
#     def __init__(self, name: str, email: str, full: str):
#         self.name = name
#         self.email = email
#         self.full = full
# 
#     def __repr__(self):
#         return "{}(name={}, email={}, full={})".format(
#             self.__class__.__name__, repr(self.name), repr(self.email), repr(self.full))
# 
#     def __eq__(self, other):
#         return all(getattr(self, i) == getattr(other, i) for i in self.__slots__)


import datetime
from imap_tools import EmailAddress

DATA = dict(
    subject='Meet the new MacBook Pro family. Now includes 13-inch.',
    from_='News@InsideApple.Apple.com',
    to=('karl.baum@gmail.com',),
    cc=(),
    bcc=(),
    reply_to=(),
    date=datetime.datetime(2009, 6, 11, 23, 25, 2, tzinfo=datetime.timezone(datetime.timedelta(-1, 61200))),
    date_str='Thu, 11 Jun 2009 23:25:02 -0700',
    text="From one solid piece of aluminum comes a MacBook Pro that's thin and light, beautifully streamlined, and durable.\r\n",
    html='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r\n<html>\r\n<head>\r\n<body>\r\nFrom one solid piece of aluminum comes a MacBook Pro that\'s thin and light, beautifully streamlined, and durable.<br><a href="http://insideapple.app</body>\r\n</html>\r\n',
    headers={'date': ('Thu, 11 Jun 2009 23:25:02 -0700',), 'from': ('Apple <News@InsideApple.Apple.com>',), 'to': ('karl.baum@gmail.com',), 'message-id': ('<7oh6b1$1clhrjk@badger-vip.apple.com>',), 'subject': ('Meet the new MacBook Pro family. Now includes 13-inch.',), 'mime-version': ('1.0',), 'content-type': ('multipart/alternative; boundary=mimepart_4b0c353551675_3d1c15b79ea5e70c1783',)},
    attachments=[],
    from_values=EmailAddress('Apple', 'News@InsideApple.Apple.com', 'Apple <News@InsideApple.Apple.com>'),

# Path: imap_tools/utils.py
# class EmailAddress:
#     """Parsed email address info"""
#     __slots__ = 'name', 'email', 'full'
# 
#     def __init__(self, name: str, email: str, full: str):
#         self.name = name
#         self.email = email
#         self.full = full
# 
#     def __repr__(self):
#         return "{}(name={}, email={}, full={})".format(
#             self.__class__.__name__, repr(self.name), repr(self.email), repr(self.full))
# 
#     def __eq__(self, other):
#         return all(getattr(self, i) == getattr(other, i) for i in self.__slots__)


# Path: tests/messages_data/error_emails/cant_parse_from.py
import datetime
from imap_tools import EmailAddress


DATA = dict(
    subject='Meet the new MacBook Pro family. Now includes 13-inch.',
    from_='News@InsideApple.Apple.com',
    to=('karl.baum@gmail.com',),
    cc=(),
    bcc=(),
    reply_to=(),
    date=datetime.datetime(2009, 6, 11, 23, 25, 2, tzinfo=datetime.timezone(datetime.timedelta(-1, 61200))),
    date_str='Thu, 11 Jun 2009 23:25:02 -0700',
    text="From one solid piece of aluminum comes a MacBook Pro that's thin and light, beautifully streamlined, and durable.\r\n",
    html='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r\n<html>\r\n<head>\r\n<body>\r\nFrom one solid piece of aluminum comes a MacBook Pro that\'s thin and light, beautifully streamlined, and durable.<br><a href="http://insideapple.app</body>\r\n</html>\r\n',
    headers={'date': ('Thu, 11 Jun 2009 23:25:02 -0700',), 'from': ('Apple <News@InsideApple.Apple.com>',), 'to': ('karl.baum@gmail.com',), 'message-id': ('<7oh6b1$1clhrjk@badger-vip.apple.com>',), 'subject': ('Meet the new MacBook Pro family. Now includes 13-inch.',), 'mime-version': ('1.0',), 'content-type': ('multipart/alternative; boundary=mimepart_4b0c353551675_3d1c15b79ea5e70c1783',)},
    attachments=[],
    from_values=EmailAddress('Apple', 'News@InsideApple.Apple.com', 'Apple <News@InsideApple.Apple.com>'),

    to_values=(EmailAddress('', 'karl.baum@gmail.com', 'karl.baum@gmail.com'),),