Skip to content

Commit

Permalink
Resolves #144
Browse files Browse the repository at this point in the history
[FIX] Fixed some VoIPPhoneParameters being tuples
  • Loading branch information
tayler6000 committed Jan 3, 2024
1 parent dd221b3 commit 200ac5c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions pyVoIP/VoIP/phone.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ class VoIPPhoneParameter:
credentials_manager: Optional[CredentialsManager]
bind_ip: Optional[str] = "0.0.0.0"
bind_port: Optional[int] = 5060
bind_network: Optional[str] = "0.0.0.0/0",
hostname: Optional[str] = None,
remote_hostname: Optional[str] = None,
bind_network: Optional[str] = "0.0.0.0/0"
hostname: Optional[str] = None
remote_hostname: Optional[str] = None
transport_mode: Optional[TransportMode] = TransportMode.UDP
cert_file: Optional[str] = None
key_file: Optional[str] = None
Expand Down
32 changes: 16 additions & 16 deletions tests/test_functionality.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def phone():
cm = CredentialsManager()
cm.add("pass", "Testing123!")
voip_phone_parameter = VoIPPhoneParameter(
server="127.0.0.1",
port=5060,
server=SERVER_HOST,
port=UDP_PORT,
user="pass",
credentials_manager=cm,
hostname="host.docker.internal",
Expand All @@ -61,8 +61,8 @@ def phone():
@pytest.fixture
def nopass_phone():
voip_phone_parameter = VoIPPhoneParameter(
server="127.0.0.1",
port=5060,
server=SERVER_HOST,
port=UDP_PORT,
user="nopass",
credentials_manager=CredentialsManager(),
hostname="host.docker.internal",
Expand All @@ -80,8 +80,8 @@ def nopass_phone():
@pytest.mark.skipif(TEST_CONDITION, reason=REASON)
def test_nopass():
voip_phone_parameter = VoIPPhoneParameter(
server="127.0.0.1",
port=5060,
server=SERVER_HOST,
port=UDP_PORT,
user="nopass",
credentials_manager=CredentialsManager(),
hostname="host.docker.internal",
Expand All @@ -107,8 +107,8 @@ def test_pass():
cm = CredentialsManager()
cm.add("pass", "Testing123!")
voip_phone_parameter = VoIPPhoneParameter(
server="127.0.0.1",
port=5060,
server=SERVER_HOST,
port=UDP_PORT,
user="pass",
credentials_manager=cm,
hostname="host.docker.internal",
Expand All @@ -132,8 +132,8 @@ def test_pass():
@pytest.mark.skipif(TEST_CONDITION, reason=REASON)
def test_tcp_nopass():
voip_phone_parameter = VoIPPhoneParameter(
server="127.0.0.1",
port=5061,
server=SERVER_HOST,
port=TCP_PORT,
user="nopass",
credentials_manager=CredentialsManager(),
hostname="host.docker.internal",
Expand All @@ -160,8 +160,8 @@ def test_tcp_pass():
cm = CredentialsManager()
cm.add("pass", "Testing123!")
voip_phone_parameter = VoIPPhoneParameter(
server="127.0.0.1",
port=5061,
server=SERVER_HOST,
port=TCP_PORT,
user="pass",
credentials_manager=cm,
hostname="host.docker.internal",
Expand All @@ -186,8 +186,8 @@ def test_tcp_pass():
@pytest.mark.skipif(TEST_CONDITION, reason=REASON)
def test_tls_nopass():
voip_phone_parameter = VoIPPhoneParameter(
server="127.0.0.1",
port=5062,
server=SERVER_HOST,
port=TLS_PORT,
user="nopass",
credentials_manager=CredentialsManager(),
bind_ip=BIND_IP,
Expand Down Expand Up @@ -216,8 +216,8 @@ def test_tls_pass():
cm = CredentialsManager()
cm.add("pass", "Testing123!")
voip_phone_parameter = VoIPPhoneParameter(
server="127.0.0.1",
port=5062,
server=SERVER_HOST,
port=TLS_PORT,
user="pass",
credentials_manager=cm,
hostname="host.docker.internal",
Expand Down

0 comments on commit 200ac5c

Please sign in to comment.