def METHOD_NAME():
    """Checks if Qiita is running in a test environment
    Returns
    -------
    bool
        Whether Qiita is running in a test environment or not
    Notes
    -----
    Qiita is running in a test environment if:
        - It is connected to a test database, AND
        - The config file indicates that this is a test environment
    """
    # Check that we are not in a production environment
    with TRN:
        TRN.add("SELECT test FROM settings")
        test_db = TRN.execute_fetchflatten()[0]
    return qiita_config.test_environment and test_db