#NEWLINE# def test_get_licence_with_user_details( self ) : #NEWLINE# #INDENT# url = reverse ( 'licence-detail' , args = ( self . licence1 . id , ) ) #NEWLINE# response = self . client . get ( url , format = 'json' ) #NEWLINE# self . assertEqual ( response . status_code , status . HTTP_200_OK ) #NEWLINE# self . assertEqual ( response . data [ 'number_bought' ] , self . licence1 . number_bought ) #NEWLINE# self . assertEqual ( response . data [ 'region' ] [ 'id' ] , self . licence1 . region . id ) #NEWLINE# self . assertEqual ( response . data [ 'manufacturer' ] [ 'id' ] , self . licence1 . manufacturer . id ) #NEWLINE# self . assertEqual ( response . data [ 'licence_type' ] [ 'id' ] , self . licence1 . licence_type . id ) #NEWLINE# self . assertEqual ( response . data [ 'software' ] [ 'id' ] , self . licence1 . software . id ) #NEWLINE# self . assertEqual ( response . data [ 'users' ] [ 0 ] [ 'user' ] [ 'id' ] , self . user1 . id )