-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from jaminh/header-parsing-fix
Fix SIP header parsing
- Loading branch information
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,18 @@ def test_parse_header_for_uri_no_space_name(): | |
assert endpoint.uri == "sip:[email protected]" | ||
|
||
|
||
def test_parse_header_for_uri_no_space_between_name(): | ||
endpoint = SipEndpoint("Test<sip:[email protected]>") | ||
assert endpoint.description == "Test" | ||
assert endpoint.uri == "sip:[email protected]" | ||
|
||
|
||
def test_parse_header_for_uri_no_space_between_quoted_name(): | ||
endpoint = SipEndpoint('"Test Endpoint"<sip:[email protected]>') | ||
assert endpoint.description == "Test Endpoint" | ||
assert endpoint.uri == "sip:[email protected]" | ||
|
||
|
||
def test_parse_header_for_uri_no_username(): | ||
endpoint = SipEndpoint("Test <sip:example.com>") | ||
assert endpoint.description == "Test" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters