#NEWLINE# def test_max_func( self ) : #NEWLINE# #INDENT# pci_info = { #NEWLINE# #INDENT# 'address' : ( '0000:0a:00.%s' % ( devspec . MAX_FUNC + 1 ) ) , #NEWLINE# 'physical_network' : 'hr_net' , #NEWLINE# #UNINDENT# } #NEWLINE# exc = self . assertRaises ( exception . PciDeviceInvalidAddressField , devspec . PciDeviceSpec , pci_info ) #NEWLINE# msg = ( 'Invalid PCI Whitelist: The PCI address 0000:0a:00.%s has an invalid function.' % ( devspec . MAX_FUNC + 1 ) ) #NEWLINE# self . assertEqual ( pci_info , six . text_type ( exc ) )