#NEWLINE# def test_format_rfc822_datetime( monkeypatch ) : #NEWLINE# #INDENT# formatted = pretend . stub ( ) #NEWLINE# formatdate = pretend . call_recorder ( ( lambda * a , **kw : formatted ) ) #NEWLINE# monkeypatch . setattr ( email . utils , 'formatdate' , formatdate ) #NEWLINE# ctx = pretend . stub ( ) #NEWLINE# timestamp = pretend . stub ( ) #NEWLINE# args = [ pretend . stub ( timestamp = ( lambda : timestamp ) ) , pretend . stub ( ) ] #NEWLINE# kwargs = { #NEWLINE# #INDENT# 'foo' : pretend . stub ( ) , #NEWLINE# #UNINDENT# } #NEWLINE# assert ( filters . format_rfc822_datetime ( ctx , * args , ** kwargs ) is formatted ) #NEWLINE# assert ( formatdate . calls == [ pretend . call ( timestamp , usegmt = True ) ] )