paulocheque / django-dynamic-fixture

A complete library to create dynamic model instances for testing purposes.
http://django-dynamic-fixture.readthedocs.io/
Other
390 stars 67 forks source link

DDFImproperlyConfigured DDF_DEFAULT_DATA_FIXTURE #55

Closed learner010 closed 4 years ago

learner010 commented 9 years ago

My settings file is at project_root/settings/client/dev.py and the fixture file is at project_root/libs/fixtures.py'

My DDF configuration is given below. DDF_DEFAULT_DATA_FIXTURE = 'libs.fixtures.ASequentialDataFixture'

During test I get following error. ERROR: Failure: DDFImproperlyConfigured (DDF_DEFAULT_DATA_FIXTURE (libs.fixtures.ASequentialDataFixture) must be 'sequential', 'static_sequential', 'global_sequential', 'random' or 'path.to.CustomDataFixtureClass'.)

paulocheque commented 9 years ago

I believe this may be a problem related to the path you are using. Check the code DDF use to load the module.

        # path.to.CustomDataFixtureClass
        mod_name, obj_name = get_mod_func(settings.DDF_DEFAULT_DATA_FIXTURE)
        module = import_module(mod_name)
        custom_data_fixture = getattr(module, obj_name)
        DDF_DEFAULT_DATA_FIXTURE = custom_data_fixture()
paulocheque commented 4 years ago

Hey @learner010 Any new on this?

I will close this issue for now. It appears to be a PYTHON_PATH problem.