#NEWLINE# def test_entry_archive_template_response_mixin( self ) : #NEWLINE# #INDENT# class FakeEntry ( object ) : #NEWLINE# #INDENT# detail_template = 'entry_detail.html' #NEWLINE# slug = 'my-fake-entry' #NEWLINE# #UNINDENT# def get_year( ) : #NEWLINE# #INDENT# return 2012 #NEWLINE# #UNINDENT# def get_week( ) : #NEWLINE# #INDENT# return 16 #NEWLINE# #UNINDENT# def get_month( ) : #NEWLINE# #INDENT# return '04' #NEWLINE# #UNINDENT# def get_day( ) : #NEWLINE# #INDENT# return 21 #NEWLINE# #UNINDENT# instance = EntryArchiveTemplateResponseMixin ( ) #NEWLINE# instance . get_year = get_year #NEWLINE# instance . get_month = get_month #NEWLINE# instance . get_week = get_week #NEWLINE# instance . get_day = get_year #NEWLINE# instance . object = FakeEntry ( ) #NEWLINE# self . assertEqual ( instance . get_template_names ( ) , [ 'zinnia/archives/2012/04/21/my-fake-entry_entry_detail.html' , 'zinnia/archives/month/04/day/21/my-fake-entry_entry_detail.html' , 'zinnia/archives/2012/day/21/my-fake-entry_entry_detail.html' , 'zinnia/archives/day/21/my-fake-entry_entry_detail.html' , 'zinnia/archives/2012/04/21/my-fake-entry.html' , 'zinnia/archives/month/04/day/21/my-fake-entry.html' , 'zinnia/archives/2012/day/21/my-fake-entry.html' , 'zinnia/archives/day/21/my-fake-entry.html' , 'zinnia/archives/2012/04/21/entry_detail.html' , 'zinnia/archives/month/04/day/21/entry_detail.html' , 'zinnia/archives/2012/day/21/entry_detail.html' , 'zinnia/archives/day/21/entry_detail.html' , 'zinnia/archives/2012/month/04/my-fake-entry_entry_detail.html' , 'zinnia/archives/month/04/my-fake-entry_entry_detail.html' , 'zinnia/archives/2012/month/04/my-fake-entry.html' , 'zinnia/archives/month/04/my-fake-entry.html' , 'zinnia/archives/2012/month/04/entry_detail.html' , 'zinnia/archives/month/04/entry_detail.html' , 'zinnia/archives/2012/week/16/my-fake-entry_entry_detail.html' , 'zinnia/archives/week/16/my-fake-entry_entry_detail.html' , 'zinnia/archives/2012/week/16/my-fake-entry.html' , 'zinnia/archives/week/16/my-fake-entry.html' , 'zinnia/archives/2012/week/16/entry_detail.html' , 'zinnia/archives/week/16/entry_detail.html' , 'zinnia/archives/2012/my-fake-entry_entry_detail.html' , 'zinnia/archives/2012/my-fake-entry.html' , 'zinnia/archives/2012/entry_detail.html' , 'zinnia/archives/my-fake-entry_entry_detail.html' , 'zinnia/my-fake-entry_entry_detail.html' , 'my-fake-entry_entry_detail.html' , 'zinnia/archives/my-fake-entry.html' , 'zinnia/my-fake-entry.html' , 'my-fake-entry.html' , 'zinnia/archives/entry_detail.html' , 'zinnia/entry_detail.html' , 'entry_detail.html' ] ) #NEWLINE# instance . object . detail_template = 'custom.html' #NEWLINE# self . assertEqual ( instance . get_template_names ( ) , [ 'zinnia/archives/2012/04/21/my-fake-entry_custom.html' , 'zinnia/archives/month/04/day/21/my-fake-entry_custom.html' , 'zinnia/archives/2012/day/21/my-fake-entry_custom.html' , 'zinnia/archives/day/21/my-fake-entry_custom.html' , 'zinnia/archives/2012/04/21/my-fake-entry.html' , 'zinnia/archives/month/04/day/21/my-fake-entry.html' , 'zinnia/archives/2012/day/21/my-fake-entry.html' , 'zinnia/archives/day/21/my-fake-entry.html' , 'zinnia/archives/2012/04/21/custom.html' , 'zinnia/archives/month/04/day/21/custom.html' , 'zinnia/archives/2012/day/21/custom.html' , 'zinnia/archives/day/21/custom.html' , 'zinnia/archives/2012/month/04/my-fake-entry_custom.html' , 'zinnia/archives/month/04/my-fake-entry_custom.html' , 'zinnia/archives/2012/month/04/my-fake-entry.html' , 'zinnia/archives/month/04/my-fake-entry.html' , 'zinnia/archives/2012/month/04/custom.html' , 'zinnia/archives/month/04/custom.html' , 'zinnia/archives/2012/week/16/my-fake-entry_custom.html' , 'zinnia/archives/week/16/my-fake-entry_custom.html' , 'zinnia/archives/2012/week/16/my-fake-entry.html' , 'zinnia/archives/week/16/my-fake-entry.html' , 'zinnia/archives/2012/week/16/custom.html' , 'zinnia/archives/week/16/custom.html' , 'zinnia/archives/2012/my-fake-entry_custom.html' , 'zinnia/archives/2012/my-fake-entry.html' , 'zinnia/archives/2012/custom.html' , 'zinnia/archives/my-fake-entry_custom.html' , 'zinnia/my-fake-entry_custom.html' , 'my-fake-entry_custom.html' , 'zinnia/archives/my-fake-entry.html' , 'zinnia/my-fake-entry.html' , 'my-fake-entry.html' , 'zinnia/archives/custom.html' , 'zinnia/custom.html' , 'custom.html' ] )