Skip to content

Commit

Permalink
Fix unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
fkantelberg committed Aug 9, 2024
1 parent 332568e commit c3eda5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Empty file added src/socket_proxy/py.typed
Empty file.
9 changes: 4 additions & 5 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from uuid import uuid4

import pytest

from socket_proxy import base, utils

from .common import CA_CERT, CLIENT_CERT, CLIENT_KEY, CRL, SERVER_CERT, SERVER_KEY
Expand Down Expand Up @@ -72,14 +71,14 @@ def test_config_protocols():
base.config.no_tcp = 0
base.config.no_http = 0
base.config.http_domain = "example.org"
assert utils.protocols() == {base.ProtocolType.TCP, base.ProtocolType.HTTP}
assert set(utils.protocols()) == {base.ProtocolType.TCP, base.ProtocolType.HTTP}
base.config.no_tcp = 1
assert utils.protocols() == {base.ProtocolType.HTTP}
assert set(utils.protocols()) == {base.ProtocolType.HTTP}
base.config.no_http = 1
assert utils.protocols() == set()
assert set(utils.protocols()) == set()
base.config.no_http = 0
base.config.http_domain = None
assert utils.protocols() == set()
assert set(utils.protocols()) == set()


def test_configure_logging():
Expand Down

0 comments on commit c3eda5e

Please sign in to comment.