Skip to content

Commit

Permalink
Issue isn't implementation, it was test (only passing due to mocks). …
Browse files Browse the repository at this point in the history
…Fixed tests.
  • Loading branch information
alexdlaird committed Nov 6, 2024
1 parent b3efd5a commit 279f853
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
9 changes: 3 additions & 6 deletions pyngrok/ngrok.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,9 @@ def connect(addr: Optional[str] = None,

_interpolate_tunnel_definition(pyngrok_config, options, addr, proto, name)

# proto can't also be passed when "labels" is defined
if proto is not None and "labels" in options:
proto = options.pop("proto")
else:
proto = options.get("proto")
name = options.get("name")
# Remove proto when "labels" is defined
if "labels" in options:
options.pop("proto")

_upgrade_legacy_params(pyngrok_config, options)

Expand Down
1 change: 0 additions & 1 deletion tests/test_ngrok.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,6 @@ def test_full_tunnel_definitions(self, mock_get_ngrok_process, mock_api_request)
config = {
"tunnels": {
"my-tunnel": {
"proto": "tcp",
"domain": "pyngrok.com",
"addr": "5000",
"inspect": "false",
Expand Down

0 comments on commit 279f853

Please sign in to comment.