Skip to content

Commit 5e8e093

Browse files
author
Shakeel Mohamed
committed
Merge branch 'feature/fixCharHandling' into develop
2 parents f8107f2 + 8ba4b4a commit 5e8e093

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_binding.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,13 @@ def test_context_with_system_sharing(self):
422422
self.assertTrue(isinstance(path, UrlEncoded))
423423
self.assertEqual(path, "/servicesNS/nobody/system/foo")
424424

425+
def test_context_with_owner_as_email(self):
426+
context = binding.connect(owner="[email protected]", **self.kwargs)
427+
path = context._abspath("foo")
428+
self.assertTrue(isinstance(path, UrlEncoded))
429+
self.assertEqual(path, "/servicesNS/me%40me.com/system/foo")
430+
self.assertEqual(path, UrlEncoded("/servicesNS/[email protected]/system/foo"))
431+
425432
# An urllib2 based HTTP request handler, used to test the binding layers
426433
# support for pluggable request handlers.
427434
def urllib2_handler(url, message, **kwargs):
@@ -495,6 +502,9 @@ def test_namespace(self):
495502
({ 'owner': "Bob", 'app': "search" },
496503
{ 'sharing': None, 'owner': "Bob", 'app': "search" }),
497504

505+
({ 'sharing': "user", 'owner': "[email protected]" },
506+
{ 'sharing': "user", 'owner': "[email protected]", 'app': None }),
507+
498508
({ 'sharing': "user" },
499509
{ 'sharing': "user", 'owner': None, 'app': None }),
500510

0 commit comments

Comments
 (0)