mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
API, batch: handle bad routes
This commit is contained in:
@@ -21,7 +21,6 @@ class ApiBatchTestCase( api.ApiTestCase ):
|
||||
return post( "%s/batch" % ( self.galaxy_interactor.api_url ), data=data )
|
||||
|
||||
def test_simple_array( self ):
|
||||
# post_body = dict( name='wert' )
|
||||
batch = [
|
||||
dict( url=self._with_key( '/api/histories' ) ),
|
||||
dict( url=self._with_key( '/api/histories' ),
|
||||
@@ -33,3 +32,13 @@ class ApiBatchTestCase( api.ApiTestCase ):
|
||||
# log.debug( 'RESPONSE %s\n%s', ( '-' * 40 ), pprint.pformat( response ) )
|
||||
self.assertIsInstance( response, list )
|
||||
self.assertEquals( len( response ), 3 )
|
||||
|
||||
def test_bad_route( self ):
|
||||
batch = [
|
||||
dict( url=self._with_key( '/api/bler' ) )
|
||||
]
|
||||
response = self._post_batch( batch )
|
||||
response = response.json()
|
||||
# log.debug( 'RESPONSE %s\n%s', ( '-' * 40 ), pprint.pformat( response ) )
|
||||
self.assertIsInstance( response, list )
|
||||
self.assertEquals( response[0][ 'status' ], 404 )
|
||||
|
||||
Reference in New Issue
Block a user