def METHOD_NAME():
    """
    Test that having users in the process of retirement cause this to fail
    """
    user = UserFactory()
    # First populate the table
    call_command('populate_retirement_states')
    # Create a UserRetirementStatus in an active state
    retirement = UserRetirementStatus.create_retirement(user)
    retirement.current_state = RetirementState.objects.get(state_name='LOCKING_ACCOUNT')
    retirement.save()
    # Now try to update
    with pytest.raises(CommandError, match=r'Users are currently being processed'):
        call_command('populate_retirement_states')