Skip to content

Commit

Permalink
test(tests/test_powerlinetailscale.py): add missing patching
Browse files Browse the repository at this point in the history
  • Loading branch information
usrme committed Sep 21, 2023
1 parent 56fe347 commit 807dcc0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_powerlinetailscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def test_profile_name_exit_node_ip(monkeypatch, segment_info):
def test_show_no_profile_no_exit_node(monkeypatch, segment_info):
monkeypatch.setitem(EXPECTED_NO_EXIT_NODE, "contents", "(ts) exit node (n)")
monkeypatch.setitem(EXPECTED_NO_EXIT_NODE, "highlight_groups", ["tailscale"])
monkeypatch.setattr(powerline_tailscale.segments, "_fetch", lambda *args: '{}')
output = powerline_tailscale.tailscale(segment_info, show_profile_name=False, show_exit_node_status=True)
assert output == [EXPECTED_NO_EXIT_NODE]

Expand All @@ -152,6 +153,7 @@ def test_show_no_profile_exit_node(monkeypatch, segment_info):
def test_show_no_profile_no_exit_node_ip(monkeypatch, segment_info):
monkeypatch.setitem(EXPECTED_NO_EXIT_NODE, "contents", "(ts) exit node (n)")
monkeypatch.setitem(EXPECTED_NO_EXIT_NODE, "highlight_groups", ["tailscale"])
monkeypatch.setattr(powerline_tailscale.segments, "_fetch", lambda *args: '{}')
output = powerline_tailscale.tailscale(
segment_info, show_profile_name=False, show_exit_node_status=False, show_exit_node=True
)
Expand Down

0 comments on commit 807dcc0

Please sign in to comment.