#NEWLINE# def test_api_tag_list( self ) : #NEWLINE# #INDENT# res = self . client . get ( self . _reverse_api ( 'api_dispatch_list' ) ) #NEWLINE# self . assertEqual ( res . status_code , 200 ) #NEWLINE# res_json = json . loads ( res . content ) [ 'objects' ] #NEWLINE# self . assertEqual ( len ( res_json ) , 3 ) #NEWLINE# self . assertEqual ( set ( [ x [ 'name' ] for x in res_json ] ) , set ( Tag . objects . values_list ( 'name' , flat = True ) ) )