#NEWLINE# @ test . create_stubs ( { #NEWLINE# #INDENT# api . trove : ( 'instance_list' , 'flavor_list' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# def test_index_pagination( self ) : #NEWLINE# #INDENT# databases = self . databases . list ( ) #NEWLINE# last_record = databases [ 1 ] #NEWLINE# databases = common . Paginated ( databases , next_marker = 'foo' ) #NEWLINE# api . trove . instance_list ( IsA ( http . HttpRequest ) , marker = None ) . AndReturn ( databases ) #NEWLINE# api . trove . flavor_list ( IsA ( http . HttpRequest ) ) . AndReturn ( self . flavors . list ( ) ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# res = self . client . get ( INDEX_URL ) #NEWLINE# self . assertTemplateUsed ( res , 'project/databases/index.html' ) #NEWLINE# self . assertContains ( res , ( 'marker=' + last_record . id ) )