#NEWLINE# def test_previous_ref_with_no_valids( self ) : #NEWLINE# #INDENT# task = self . create_task ( app = self . app , user = self . user , status = TaskStatus . finished , sha = uuid4 ( ) . hex ) #NEWLINE# self . create_deploy ( app = self . app , task = task , environment = 'staging' ) #NEWLINE# resp = self . client . post ( self . path , data = { #NEWLINE# #INDENT# 'env' : 'staging' , #NEWLINE# 'app' : task . app . name , #NEWLINE# 'user' : self . user . name , #NEWLINE# 'ref' : ':previous' , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert ( resp . status_code == 400 ) #NEWLINE# data = json . loads ( resp . data ) #NEWLINE# assert ( data [ 'error_name' ] == 'invalid_ref' )