#NEWLINE# def test_empty_type( self ) : #NEWLINE# #INDENT# with mock . patch ( 'urllib2.urlopen' ) as urlopen_mock : #NEWLINE# #INDENT# urlopen_mock . return_value . read . return_value = json . dumps ( { #NEWLINE# #INDENT# '_type' : 'event' , #NEWLINE# '_id' : 'w0HnGYHFSOS7EBIWnxBcEg' , #NEWLINE# 'ok' : True , #NEWLINE# '_version' : 1 , #NEWLINE# '_index' : 'test' , #NEWLINE# #UNINDENT# } ) #NEWLINE# i = self . create ( { #NEWLINE# #INDENT# 'index' : 'test' , #NEWLINE# 'type' : '' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . input . put ( Event ( field = 'x' ) ) #NEWLINE# self . waitForEmpty ( ) #NEWLINE# i . stop ( ) #NEWLINE# self . failIf ( urlopen_mock . called )