#NEWLINE# def test_minimal( self ) : #NEWLINE# #INDENT# resp = self . client . post ( self . path , data = { #NEWLINE# #INDENT# 'sha' : ( 'a' * 40 ) , #NEWLINE# 'project' : data . project . slug , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert ( resp . status_code == 200 ) #NEWLINE# data = self . unserialize ( resp ) #NEWLINE# assert ( len ( data ) == 1 ) #NEWLINE# assert data [ 0 ] [ 'id' ] #NEWLINE# job = Job . query . filter ( ( Job . build_id == data [ 0 ] [ 'id' ] ) ) . first ( ) #NEWLINE# build = job . build #NEWLINE# source = build . source #NEWLINE# assert ( build . cause == Cause . unknown ) #NEWLINE# assert ( job . project == self . project ) #NEWLINE# assert ( source . repository_id == self . project . repository_id ) #NEWLINE# assert ( source . revision_sha == ( 'a' * 40 ) )