#NEWLINE# @ patch ( 'bokeh.io.publish_display_data' ) #NEWLINE# @ patch ( 'bokeh.io.autoload_server' ) #NEWLINE# @ patch ( 'bokeh.io.push' ) #NEWLINE# def test_with_server( self , mock_push , mock_autoload_server , mock_publish_display_data ) : #NEWLINE# #INDENT# s = io . State ( ) #NEWLINE# s . _server_enabled = True #NEWLINE# mock_autoload_server . return_value = 'snippet' #NEWLINE# io . _show_notebook_with_state ( 'obj' , s ) #NEWLINE# self . _check_func_called ( mock_push , ( ) , { #NEWLINE# #INDENT# 'state' : s , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . _check_func_called ( mock_publish_display_data , ( { #NEWLINE# #INDENT# 'text/html' : 'snippet' , #NEWLINE# #UNINDENT# } , ) , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } )