#NEWLINE# def test_get( self ) : #NEWLINE# #INDENT# category = Category . objects . get ( slug = 'crime' ) #NEWLINE# response = self . client . get ( ( '/api/1.0/category/%s/' % category . slug ) , ** self . auth_headers ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# body = json . loads ( response . content ) #NEWLINE# self . assertEqual ( body [ 'name' ] , 'Crime' ) #NEWLINE# self . assertEqual ( body [ 'slug' ] , 'crime' ) #NEWLINE# self . assertEqual ( body [ 'dataset_count' ] , 0 ) #NEWLINE# category . datasets . add ( self . dataset ) #NEWLINE# response = self . client . get ( ( '/api/1.0/category/%s/' % category . slug ) , ** self . auth_headers ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# body = json . loads ( response . content ) #NEWLINE# self . assertEqual ( body [ 'dataset_count' ] , 1 )