#NEWLINE# def test_admin_validation( self ) : #NEWLINE# #INDENT# "\n        Make sure we can't create two sections with the same slug under one\n        parent.\n        " #NEWLINE# self . login_and_load ( ) #NEWLINE# test_section = TestSection . objects . get ( slug = '2' ) #NEWLINE# admin_urls = self . get_admin_urls ( err ) #NEWLINE# response = self . client . post ( admin_urls [ 'create' ] , { #NEWLINE# #INDENT# 'slug' : '22' , #NEWLINE# 'title' : 'Invalid!' , #NEWLINE# #UNINDENT# } ) #NEWLINE# err = response . context [ 'adminform' ] . form . errors [ 'slug' ] [ 0 ] #NEWLINE# self . assertEqual ( 'Test section with this Slug already exists.' , err )