Source code for fobi.tests.base

from __future__ import print_function

from django.conf import settings

__title__ = 'fobi.tests.base'
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
__copyright__ = '2014-2017 Artur Barseghyan'
__license__ = 'GPL 2.0/LGPL 2.1'
__all__ = (
    'PRINT_INFO',
    'print_info',
    'fobi_setup',
    'skip',
    'is_fobi_setup_completed',
    'mark_fobi_setup_as_completed',
)

# ****************************************************************************
# **************** Safe User import for Django > 1.5, < 1.8 ******************
# ****************************************************************************
AUTH_USER_MODEL = settings.AUTH_USER_MODEL

# ****************************************************************************
# ****************************************************************************
# ****************************************************************************

PRINT_INFO = True



SKIP = False



class FobiSetup(object):
    """Setup fobi.

    Basic setup class in order to avoid the fobi test data
    to be initialised multiple times.
    """

    def __init__(self):
        self.is_done = False


fobi_setup = FobiSetup()


[docs]def is_fobi_setup_completed(): """Is fobi setup completed?""" return fobi_setup.is_done is True
[docs]def mark_fobi_setup_as_completed(): """Mark fobi setup as completed.""" fobi_setup.is_done = True