def METHOD_NAME(self):
    os.environ.pop('TOWER_SECRET_KEY', None)
    with pytest.raises(SystemExit) as e:
        call_command('regenerate_secret_key', '--use-custom-key')
    assert e.type == SystemExit
    assert e.value.code == 1