Exemplo n.º 1
0
 def test_password(self):
     self.options.password = '******'
     command.main()
     assert self.factory.password == 'openseseame'
Exemplo n.º 2
0
 def test_single_host_name(self):
     self.options.server = '10.11.12.13'
     command.main()
     connectTCP = command.reactor.connectTCP
     connectTCP.assert_called_once_with('10.11.12.13', 5900, self.factory)
Exemplo n.º 3
0
 def test_host_display(self):
     self.options.server = '10.11.12.13'
     self.options.display = 10
     command.main()
     connectTCP = command.reactor.connectTCP
     connectTCP.assert_called_once_with('10.11.12.13', 5910, self.factory)
Exemplo n.º 4
0
 def test_host_default(self):
     command.main()
     connectTCP = command.reactor.connectTCP
     connectTCP.assert_called_once_with('127.0.0.1', 5900, self.factory)
Exemplo n.º 5
0
 def test_host_port(self):
     self.options.server = '10.11.12.13:4444'
     command.main()
     connectTCP = command.reactor.connectTCP
     connectTCP.assert_called_once_with('10.11.12.13', 4444, self.factory)
Exemplo n.º 6
0
 def test_localhost_display(self):
     self.options.display = 10
     command.main()
     connectTCP = command.reactor.connectTCP
     connectTCP.assert_called_once_with('127.0.0.1', 5910, self.factory)
Exemplo n.º 7
0
 def test_host_default(self):
     command.main()
     assert self.options.host == '127.0.0.1'
     assert self.options.port == 5900
Exemplo n.º 8
0
 def test_host_display(self):
     self.options.server = '10.11.12.13'
     self.options.display = 10
     command.main()
     assert self.options.host == '10.11.12.13'
     assert self.options.port == 5910
Exemplo n.º 9
0
 def test_localhost_display(self):
     self.options.display = 10
     command.main()
     assert self.options.host == '127.0.0.1'
     assert self.options.port == 5910
Exemplo n.º 10
0
 def test_host_port(self):
     self.options.server = '10.11.12.13:4444'
     command.main()
     assert self.options.host == '10.11.12.13'
     assert self.options.port == 4444
Exemplo n.º 11
0
 def test_single_host_name(self):
     self.options.server = '10.11.12.13'
     command.main()
     assert self.options.server == '10.11.12.13'
     assert self.options.port == 5900