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