#NEWLINE# def test_create_search_criteria_by_date( self ) : #NEWLINE# #INDENT# self . imap_account = imaplib . IMAP4_SSL ( ) #NEWLINE# date = datetime . datetime ( 1989 , 1 , 3 ) #NEWLINE# search_criterion = search . create_search_criterion ( date = date ) #NEWLINE# assert ( search_criterion == [ 'SINCE 03-Jan-1989' ] ) #NEWLINE# search_criterion = search . create_search_criterion_by_date ( date , relative = 'BEFORE' ) #NEWLINE# assert ( search_criterion == 'BEFORE 03-Jan-1989' ) #NEWLINE# search_criterion = search . create_search_criterion_by_date ( date , relative = 'ON' ) #NEWLINE# assert ( search_criterion == 'ON 03-Jan-1989' ) #NEWLINE# search_criterion = search . create_search_criterion_by_date ( date , relative = 'SINCE' ) #NEWLINE# assert ( search_criterion == 'SINCE 03-Jan-1989' ) #NEWLINE# search_criterion = search . create_search_criterion_by_date ( date , relative = 'BEFORE' , sent = True ) #NEWLINE# assert ( search_criterion == 'SENTBEFORE 03-Jan-1989' ) #NEWLINE# search_criterion = search . create_search_criterion_by_date ( search_criterion , relative = 'ON' , sent = True ) #NEWLINE# assert ( search_criterion == 'SENTON 03-Jan-1989' ) #NEWLINE# search_criterion = search . create_search_criterion_by_date ( date , relative = 'SINCE' , sent = True ) #NEWLINE# assert ( search_criterion == 'SENTSINCE 03-Jan-1989' )