Example #1
0
File: help.py Project: zmchu/stem
 def test_signal_help(self):
     result = response(CONTROLLER, 'SIGNAL')
     self.assertTrue(
         'Issues a signal that tells the tor process to' in result)
     self.assertTrue(
         '\x1b[34;1mRELOAD / HUP   \x1b[0m\x1b[34m - reload our torrc' in
         result)
Example #2
0
File: help.py Project: zmchu/stem
 def test_getconf_help(self):
     result = response(CONTROLLER, 'GETCONF')
     self.assertTrue(
         'Provides the current value for a given configuration value. Options include...'
         in result)
     self.assertTrue(
         '\x1b[34mExitNodes                                 ExitPolicy' in
         result)
Example #3
0
File: help.py Project: zmchu/stem
 def test_getinfo_help(self):
     result = response(CONTROLLER, 'GETINFO')
     self.assertTrue(
         'Queries the tor process for information. Options are...' in
         result)
     self.assertTrue(
         '\x1b[34;1minfo/names                       \x1b[0m\x1b[34m - List of GETINFO options, types, and documentation.'
         in result)
Example #4
0
 def test_usefeature_help(self):
   result = response(CONTROLLER, 'USEFEATURE')
   self.assertTrue('Customizes the behavior of the control port.' in result)
   self.assertTrue('\x1b[34mVERBOSE_NAMES EXTENDED_EVENTS\x1b[0m' in result)
Example #5
0
 def test_setevents_help(self):
   result = response(CONTROLLER, 'SETEVENTS')
   self.assertTrue('Sets the events that we will receive.' in result)
   self.assertTrue('\x1b[34mBW                  DEBUG               INFO                NOTICE\x1b[0m' in result)
Example #6
0
 def test_signal_help(self):
   result = response(CONTROLLER, 'SIGNAL')
   self.assertTrue('Issues a signal that tells the tor process to' in result)
   self.assertTrue('\x1b[34;1mRELOAD / HUP   \x1b[0m\x1b[34m - reload our torrc' in result)
Example #7
0
 def test_getconf_help(self):
   result = response(CONTROLLER, 'GETCONF')
   self.assertTrue('Provides the current value for a given configuration value. Options include...' in result)
   self.assertTrue('\x1b[34mExitNodes                                 ExitPolicy' in result)
Example #8
0
 def test_getinfo_help(self):
   result = response(CONTROLLER, 'GETINFO')
   self.assertTrue('Queries the tor process for information. Options are...' in result)
   self.assertTrue('\x1b[34;1minfo/names                       \x1b[0m\x1b[34m - List of GETINFO options, types, and documentation.' in result)
Example #9
0
 def test_general_help(self):
   result = response(CONTROLLER, '')
   self.assertTrue('Interpreter commands include:' in result)
   self.assertTrue('\x1b[34;1m  GETINFO\x1b[0m\x1b[34m - queries information from tor\x1b[0m\n' in result)
Example #10
0
 def test_unrecognized_option(self):
   result = response(CONTROLLER, 'FOOBAR')
   self.assertEqual("\x1b[1;31mNo help information available for 'FOOBAR'...\x1b[0m", result)
Example #11
0
File: help.py Project: zmchu/stem
 def test_usefeature_help(self):
     result = response(CONTROLLER, 'USEFEATURE')
     self.assertTrue(
         'Customizes the behavior of the control port.' in result)
     self.assertTrue(
         '\x1b[34mVERBOSE_NAMES EXTENDED_EVENTS\x1b[0m' in result)
Example #12
0
File: help.py Project: zmchu/stem
 def test_setevents_help(self):
     result = response(CONTROLLER, 'SETEVENTS')
     self.assertTrue('Sets the events that we will receive.' in result)
     self.assertTrue(
         '\x1b[34mBW                  DEBUG               INFO                NOTICE\x1b[0m'
         in result)
Example #13
0
File: help.py Project: zmchu/stem
 def test_general_help(self):
     result = response(CONTROLLER, '')
     self.assertTrue('Interpreter commands include:' in result)
     self.assertTrue(
         '\x1b[34;1m  GETINFO\x1b[0m\x1b[34m - queries information from tor\x1b[0m\n'
         in result)
Example #14
0
File: help.py Project: zmchu/stem
 def test_unrecognized_option(self):
     result = response(CONTROLLER, 'FOOBAR')
     self.assertEqual(
         "\x1b[1;31mNo help information available for 'FOOBAR'...\x1b[0m",
         result)