Example #1
0
 def test_password(self):
     self.options.password = '******'
     command.main()
     assert self.factory.password == 'openseseame'
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #7
0
 def test_host_default(self):
     command.main()
     assert self.options.host == '127.0.0.1'
     assert self.options.port == 5900
Example #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
Example #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
Example #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
Example #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