Example #1
0
    def test_import_providers(self, settings, dynamic_import):
        settings.CUSTOM_PROVIDER = {'foo': 'foo.bar'}
        expected_result = {'foo': True}

        providers = utils.import_providers()

        self.assertDictEqual(expected_result, providers)
Example #2
0
    def __init__(self, *args, **kwargs):
        # Attributes
        self._blacklisted = False
        self._disabled = False
        self._view = {}
        self._time = {}
        self._user = None
        self._process = None
        self._access = None
        self._response = {}
        self._exception = {}

        # Dynamic import of provider functions
        self._providers = import_providers()