<s> """<STR_LIT>""" <EOL> from grr . lib import flags <EOL> from grr . lib import test_lib <EOL> from grr . lib . checks import checks_test_lib <EOL> from grr . parsers import linux_sysctl_parser <EOL> class SysctlTests ( checks_test_lib . HostCheckTest ) : <EOL> @ classmethod <EOL> def setUpClass ( cls ) : <EOL> cls . LoadCheck ( "<STR_LIT>" ) <EOL> cls . parser = linux_sysctl_parser . ProcSysParser ( ) <EOL> def testRPFilter ( self ) : <EOL> """<STR_LIT>""" <EOL> chk_id = "<STR_LIT>" <EOL> test_data = { "<STR_LIT>" : "<STR_LIT:2>" } <EOL> host_data = self . GenFileData ( "<STR_LIT>" , test_data , <EOL> self . parser ) <EOL> results = self . RunChecks ( host_data ) <EOL> sym = "<STR_LIT>" <EOL> found = [ "<STR_LIT>" ] <EOL> self . assertCheckDetectedAnom ( chk_id , results , sym , found ) <EOL> test_data = { "<STR_LIT>" : "<STR_LIT:1>" } <EOL> host_data = self . GenFileData ( "<STR_LIT>" , test_data , <EOL> self . parser ) <EOL> results = self . RunChecks ( host_data ) <EOL> self . assertCheckUndetected ( chk_id , results ) <EOL> def main ( argv ) : <EOL> test_lib . GrrTestProgram ( argv = argv ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> flags . StartMain ( main ) </s>
