Esempio n. 1
0
File: help.py Progetto: 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)
Esempio n. 2
0
File: help.py Progetto: 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)
Esempio n. 3
0
File: help.py Progetto: 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 10
0
 def test_unrecognized_option(self):
   result = response(CONTROLLER, 'FOOBAR')
   self.assertEqual("\x1b[1;31mNo help information available for 'FOOBAR'...\x1b[0m", result)
Esempio n. 11
0
File: help.py Progetto: 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)
Esempio n. 12
0
File: help.py Progetto: 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)
Esempio n. 13
0
File: help.py Progetto: 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)
Esempio n. 14
0
File: help.py Progetto: zmchu/stem
 def test_unrecognized_option(self):
     result = response(CONTROLLER, 'FOOBAR')
     self.assertEqual(
         "\x1b[1;31mNo help information available for 'FOOBAR'...\x1b[0m",
         result)