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