#NEWLINE# def test_begin_speech( self ) : #NEWLINE# #INDENT# Speaker . objects . add ( self . user , self . item ) #NEWLINE# speaker = Speaker . objects . add ( get_user_model ( ) . objects . get ( username = 'admin' ) , self . item ) #NEWLINE# self . assertTrue ( ( Speaker . objects . get ( pk = speaker . pk ) . begin_time is None ) ) #NEWLINE# response = self . client . put ( reverse ( 'item-speak' , args = [ self . item . pk ] ) , { #NEWLINE# #INDENT# 'speaker' : speaker . pk , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# self . assertFalse ( ( Speaker . objects . get ( pk = speaker . pk ) . begin_time is None ) )