コード例 #1
0
 def test_reservation_enviroment_not_exists_get_server_ip_return_actual_host_ip(self):
   tfos_server = Server(5)
   assert tfos_server.get_server_ip() == util.get_ip_address()
コード例 #2
0
 def test_reservation_enviroment_exists_get_server_ip_return_environment_value(self):
     tfos_server = Server(5)
     with mock.patch.dict(os.environ, {'TFOS_SERVER_HOST': 'my_host_ip'}):
       assert tfos_server.get_server_ip() == "my_host_ip"