#NEWLINE# @ add_fixtures ( [ 'test_scmtools' ] ) #NEWLINE# def test_delete_with_review_requests( self ) : #NEWLINE# #INDENT# 'Testing the DELETE groups/<id>/ API with existing review requests' #NEWLINE# self . _login_user ( admin = True ) #NEWLINE# group = Group . objects . create ( name = 'test-group' , invite_only = True ) #NEWLINE# group . users . add ( request . user ) #NEWLINE# repository = self . create_repository ( ) #NEWLINE# request = ReviewRequest . objects . create ( self . user , repository ) #NEWLINE# request . target_groups . add ( group ) #NEWLINE# self . api_delete ( get_review_group_item_url ( 'test-group' ) , expected_status = 204 ) #NEWLINE# request = ReviewRequest . objects . get ( pk = request . id ) #NEWLINE# self . assertEqual ( request . target_groups . count ( ) , 0 )