#NEWLINE# def test_simple_get( self ) : #NEWLINE# #INDENT# 'Test that GET without any parameters returns correct response.' #NEWLINE# alice = self . make_participant ( 'alice' , claimed_time = 'now' ) #NEWLINE# Enterprise = self . make_team ( 'The Enterprise' , is_approved = True ) #NEWLINE# Trident = self . make_team ( 'The Trident' , is_approved = True ) #NEWLINE# data = json . loads ( self . client . GET ( '~/alice/payment-instructions.json' , auth_as = 'alice' ) . body ) #NEWLINE# assert ( len ( data ) == 0 ) #NEWLINE# alice . set_payment_instruction ( Enterprise , '10.0' ) #NEWLINE# alice . set_payment_instruction ( Trident , '12.0' ) #NEWLINE# data = json . loads ( self . client . GET ( '~/alice/payment-instructions.json' , auth_as = 'alice' ) . body ) #NEWLINE# assert ( len ( data ) == 2 ) #NEWLINE# assert ( data [ 0 ] [ 'team_slug' ] == Trident . slug ) #NEWLINE# assert ( data [ 0 ] [ 'amount' ] == '12.00' ) #NEWLINE# assert ( data [ 0 ] [ 'team_name' ] == Trident . name ) #NEWLINE# assert ( data [ 1 ] [ 'team_slug' ] == Enterprise . slug ) #NEWLINE# assert ( data [ 1 ] [ 'amount' ] == '10.00' ) #NEWLINE# assert ( data [ 1 ] [ 'team_name' ] == Enterprise . name ) #NEWLINE# for d in data : #NEWLINE# #INDENT# assert ( 'due' in d ) #NEWLINE# assert ( 'ctime' in d ) #NEWLINE# assert ( 'mtime' in d )