#NEWLINE# def test_remove_plugin_before_published( self ) : #NEWLINE# #INDENT# '\n        When removing a draft plugin we would expect the public copy of the plugin to also be removed\n        ' #NEWLINE# page = api . create_page ( title = 'test page' , language = settings . LANGUAGES [ 0 ] [ 0 ] , template = 'nav_playground.html' ) #NEWLINE# plugin = api . add_plugin ( placeholder = page . placeholders . get ( slot = 'body' ) , language = 'en' , plugin_type = 'TextPlugin' , body = '' ) #NEWLINE# self . assertEqual ( CMSPlugin . objects . all ( ) . count ( ) , 1 ) #NEWLINE# plugin_data = { #NEWLINE# #INDENT# 'plugin_id' : plugin . pk , #NEWLINE# #UNINDENT# } #NEWLINE# remove_url = ( URL_CMS_PLUGIN_REMOVE + ( '%s/' % plugin . pk ) ) #NEWLINE# response = self . client . post ( response , plugin_data ) #NEWLINE# self . assertEqual ( response . status_code , 302 ) #NEWLINE# self . assertEqual ( 0 , CMSPlugin . objects . all ( ) . count ( ) )