#NEWLINE# def test__drop_collection( self ) : #NEWLINE# #INDENT# self . db . a #NEWLINE# self . db . b #NEWLINE# self . db . c #NEWLINE# self . db . drop_collection ( 'b' ) #NEWLINE# self . db . drop_collection ( 'b' ) #NEWLINE# self . db . drop_collection ( self . db . c ) #NEWLINE# self . assertEqual ( set ( self . db . collection_names ( ) ) , set ( [ 'a' , 'system.indexes' ] ) ) #NEWLINE# col = self . db . a #NEWLINE# r = col . insert ( { #NEWLINE# #INDENT# 'aa' : 'bb' , #NEWLINE# #UNINDENT# } ) #NEWLINE# qr = col . find ( { #NEWLINE# #INDENT# '_id' : r , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( qr . count ( ) , 1 ) #NEWLINE# self . db . drop_collection ( 'a' ) #NEWLINE# qr = col . find ( { #NEWLINE# #INDENT# '_id' : r , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( qr . count ( ) , 0 ) #NEWLINE# col = self . db . a #NEWLINE# r = col . insert ( { #NEWLINE# #INDENT# 'aa' : 'bb' , #NEWLINE# #UNINDENT# } ) #NEWLINE# qr = col . find ( { #NEWLINE# #INDENT# '_id' : r , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( qr . count ( ) , 1 ) #NEWLINE# self . db . drop_collection ( col ) #NEWLINE# qr = col . find ( { #NEWLINE# #INDENT# '_id' : self , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( qr . count ( ) , 0 )