#NEWLINE# def test_get_resource_id_none( self ) : #NEWLINE# #INDENT# '\n        get_resource_id should return None if none found\n        ' #NEWLINE# if ( not SETTINGS [ 'dhis2_enabled' ] ) : #NEWLINE# #INDENT# self . skipTest ( 'DHIS2 is not configured' ) #NEWLINE# #UNINDENT# resources = { #NEWLINE# #INDENT# 'Knights' : [ ] , #NEWLINE# #UNINDENT# } #NEWLINE# dhis2_api = Dhis2Api ( SETTINGS [ 'dhis2_host' ] , SETTINGS [ 'dhis2_username' ] , SETTINGS [ 'dhis2_password' ] ) #NEWLINE# dhis2_api . _request . get = Mock ( return_value = ( 'foo' , dhis2_api ) ) #NEWLINE# result = dhis2_api . get_resource_id ( 'Knights' , 'Who Say "Ni!"' ) #NEWLINE# self . assertIsNone ( result )