blob: dd063bc4b2b69124e48c38df7d6a9e07e967eeca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
from mock import Mock
from datetime import datetime
LEAP_FLAGS = ['\\Seen',
'\\Answered',
'\\Flagged',
'\\Deleted',
'\\Draft',
'\\Recent',
'List']
def leap_mail(uid=0, leap_flags=LEAP_FLAGS, extra_flags=[], headers={'date': str(datetime.now())}):
flags = leap_flags + extra_flags
return Mock(getUID=Mock(return_value=uid),
getFlags=Mock(return_value=flags),
bdoc=Mock(content={'raw': 'test'}),
hdoc=Mock(content={'headers': headers}))
|