#NEWLINE# def test_sends_if_annotation_public( self ) : #NEWLINE# #INDENT# "\n        Everyone should see annotations which are public.\n\n        When logged-out, effective principals contains only\n        `pyramid.security.Everyone`. This test ensures that the system\n        principal is correctly equated with the annotation principal\n        'group:__world__', ensuring that everyone (including logged-out users)\n        receives all public annotations.\n        " #NEWLINE# message = { #NEWLINE# #INDENT# 'annotation' : { #NEWLINE# #INDENT# 'user' : 'fred' , #NEWLINE# 'permissions' : { #NEWLINE# #INDENT# 'read' : [ 'group:__world__' ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# 'action' : 'update' , #NEWLINE# 'src_client_id' : 'pigeon' , #NEWLINE# #UNINDENT# } #NEWLINE# socket = FakeSocket ( 'giraffe' ) #NEWLINE# socket . request . effective_principals = [ security . Everyone ] #NEWLINE# assert ( messages . handle_annotation_event ( socket , socket ) is not None )