<s> from olympia . amo . tests import TestCase <EOL> from olympia . access . acl import action_allowed_user <EOL> from olympia . users . models import UserProfile <EOL> from olympia . zadmin . management . commands . addusertogroup import do_adduser <EOL> from olympia . zadmin . management . commands . removeuserfromgroup import do_removeuser <EOL> class TestCommand ( TestCase ) : <EOL> fixtures = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> def test_group_management ( self ) : <EOL> user = UserProfile . objects . get ( pk = <NUM_LIT> ) <EOL> assert not action_allowed_user ( user , '<STR_LIT>' , '<STR_LIT:%>' ) <EOL> do_adduser ( '<STR_LIT>' , '<STR_LIT:1>' ) <EOL> del user . groups_list <EOL> assert action_allowed_user ( user , '<STR_LIT>' , '<STR_LIT:%>' ) <EOL> do_removeuser ( '<STR_LIT>' , '<STR_LIT:1>' ) <EOL> del user . groups_list <EOL> assert not action_allowed_user ( user , '<STR_LIT>' , '<STR_LIT:%>' ) </s>
