def test_short_port_options(self): """ The p short option should end up in the 'port' key. """ config = Options() config.parseOptions(['-p', 'tcp:9999']) self.assertEqual(config['port'], 'tcp:9999')
def test_short_port_options(self): """ The p short option should end up in the 'port' key. """ config = Options() config.parseOptions(["-p", "tcp:9999"]) self.assertEqual(config["port"], "tcp:9999")
def test_short_admin_options(self): """ The a short option should end up in the 'admin' key. """ config = Options() config.parseOptions(['-a', 'tcp:9789']) self.assertEqual(config['admin'], 'tcp:9789')
def test_admin_options(self): """ The port long option should end up in the 'port' key. """ config = Options() config.parseOptions(['--admin=tcp:9789']) self.assertEqual(config['admin'], 'tcp:9789')
def test_short_store_options(self): """ The m shor toption should end up in the 'mock' key """ config = Options() self.assertFalse(config['mock']) config.parseOptions(['-m']) self.assertTrue(config['mock'])
def test_short_store_options(self): """ The m shor toption should end up in the 'mock' key """ config = Options() self.assertFalse(config["mock"]) config.parseOptions(["-m"]) self.assertTrue(config["mock"])
def test_store_options(self): """ The mock long flag option should end up in the 'mock' key """ config = Options() self.assertFalse(config['mock']) config.parseOptions(['--mock']) self.assertTrue(config['mock'])