Skip to content

Commit 16063f7

Browse files
author
Shakeel Mohamed
committed
Add tests for special char handling
1 parent c229cda commit 16063f7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_binding.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,12 @@ def test_context_with_system_sharing(self):
373373
self.assertTrue(isinstance(path, UrlEncoded))
374374
self.assertEqual(path, "/servicesNS/nobody/system/foo")
375375

376+
def test_context_with_owner_as_email(self):
377+
context = binding.connect(owner="[email protected]", **self.kwargs)
378+
path = context._abspath("foo")
379+
self.assertTrue(isinstance(path, UrlEncoded))
380+
self.assertEqual(path, UrlEncoded("/servicesNS/[email protected]/system/foo"))
381+
376382
# An urllib2 based HTTP request handler, used to test the binding layers
377383
# support for pluggable request handlers.
378384
def urllib2_handler(url, message, **kwargs):
@@ -446,6 +452,9 @@ def test_namespace(self):
446452
({ 'owner': "Bob", 'app': "search" },
447453
{ 'sharing': None, 'owner': "Bob", 'app': "search" }),
448454

455+
({ 'sharing': "user", 'owner': "[email protected]" },
456+
{ 'sharing': "user", 'owner': "[email protected]", 'app': None }),
457+
449458
({ 'sharing': "user" },
450459
{ 'sharing': "user", 'owner': None, 'app': None }),
451460

0 commit comments

Comments
 (0)