[telepathy-sofiasip/master] Test quoting and whitespace normalization of the display name
Mikhail Zabaluev
mikhail.zabaluev at nokia.com
Tue Sep 29 06:45:26 PDT 2009
---
tests/twisted/test-self-alias.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/tests/twisted/test-self-alias.py b/tests/twisted/test-self-alias.py
index 863d1e1..a105da8 100644
--- a/tests/twisted/test-self-alias.py
+++ b/tests/twisted/test-self-alias.py
@@ -36,5 +36,12 @@ def test(q, bus, conn, sip_proxy):
from_header = event.sip_message.headers['from'][0]
assert from_header.startswith('"foo at bar.baz" <' + self_uri + '>'), from_header
+ # test if escaping and whitespace normalization works
+ conn.Aliasing.SetAliases({self_handle: 'foo " bar \\\r\n baz\t'})
+ text_iface.Send(0, 'Hello again')
+ event = q.expect('sip-message')
+ from_header = event.sip_message.headers['from'][0]
+ assert from_header.startswith(r'"foo \" bar \\ baz " <' + self_uri + '>'), from_header
+
if __name__ == '__main__':
exec_test(test)
--
1.5.6.5
More information about the telepathy-commits
mailing list