#NEWLINE# def testParseLSBInit( self ) : #NEWLINE# #INDENT# 'Init entries return accurate LinuxServiceInformation values.' #NEWLINE# configs = GenInit ( 'sshd' , 'OpenBSD Secure Shell server' ) #NEWLINE# ( stats , files ) = GenTestData ( configs , configs . values ( ) ) #NEWLINE# parser = linux_service_parser . LinuxLSBInitParser ( ) #NEWLINE# results = list ( parser . ParseMultiple ( stats , files , None ) ) #NEWLINE# self . assertIsInstance ( results [ 0 ] , rdf_client . LinuxServiceInformation ) #NEWLINE# result = results [ 0 ] #NEWLINE# self . assertEqual ( 'sshd' , result . name ) #NEWLINE# self . assertEqual ( 'OpenBSD Secure Shell server' , result . description ) #NEWLINE# self . assertEqual ( 'INIT' , result . start_mode ) #NEWLINE# self . assertItemsEqual ( [ 2 , 3 , 4 , 5 ] , result . start_on ) #NEWLINE# self . assertItemsEqual ( [ 1 ] , result . stop_on ) #NEWLINE# self . assertItemsEqual ( [ 'umountfs' , 'umountnfs' , 'sendsigs' , 'rsyslog' , 'sysklogd' , 'syslog-ng' , 'dsyslog' , 'inetutils-syslogd' ] , result . start_after ) #NEWLINE# self . assertItemsEqual ( [ 'rsyslog' , 'sysklogd' , 'syslog-ng' , 'dsyslog' , 'inetutils-syslogd' ] , result . stop_after )