gradio/test/test_tunneling.py
Abubakar Abid d15590d49c
Persistent FRP (#3149)
* start

* adding share_token

* added token

* revert older changes

* revert older changes

* fixes

* revert

* print

* changes

* version

* changelog, version

* fix tests
2023-02-16 16:31:16 -06:00

12 lines
337 B
Python

import pytest
from gradio import Interface, networking
@pytest.mark.flaky
def test_setup_tunnel():
io = Interface(lambda x: x, "number", "number")
io.launch(show_error=True, prevent_thread_lock=True)
share_url = networking.setup_tunnel(io.server_name, io.server_port, io.share_token)
assert isinstance(share_url, str)