Beispiel #1
0
 def parses_with_long_args(self):
     options = create_options_from_arguments([
         '--port=1234',
         '--address=other.server',
         '--text-protocol'
     ])
     self.assertEqual(options.port, 1234)
     self.assertEqual(options.address, 'other.server')
     self.assertTrue(options.is_text_protocol)
Beispiel #2
0
 def parses_with_short_args(self):
     options = create_options_from_arguments([
         '-p', '1234',
         '-a', 'other.server',
         '-t'
     ])
     self.assertEqual(options.port, 1234)
     self.assertEqual(options.address, 'other.server')
     self.assertTrue(options.is_text_protocol)
Beispiel #3
0
 def parses_with_long_args(self):
     options = create_options_from_arguments(
         ['--port=1234', '--address=other.server', '--text-protocol'])
     self.assertEqual(options.port, 1234)
     self.assertEqual(options.address, 'other.server')
     self.assertTrue(options.is_text_protocol)
Beispiel #4
0
 def parses_with_short_args(self):
     options = create_options_from_arguments(
         ['-p', '1234', '-a', 'other.server', '-t'])
     self.assertEqual(options.port, 1234)
     self.assertEqual(options.address, 'other.server')
     self.assertTrue(options.is_text_protocol)
Beispiel #5
0
 def parses_without_args(self):
     options = create_options_from_arguments([])
     self.assertEqual(options.port, 22322)
     self.assertEqual(options.address, 'localhost')
     self.assertFalse(options.is_text_protocol)
Beispiel #6
0
 def parses_without_args(self):
     options = create_options_from_arguments([])
     self.assertEqual(options.port, 22322)
     self.assertEqual(options.address, 'localhost')
     self.assertFalse(options.is_text_protocol)