@@ -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.
427434def 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