

def test_uses_generator_defined_on_settings_for_custom_foreignkey(self):
    generator_dict = {
        'test.generic.fields.CustomForeignKey': 'model_mommy.mommy.make',
    }
    setattr(settings, 'MOMMY_CUSTOM_FIELDS_GEN', generator_dict)
    obj = mommy.make(CustomForeignKeyWithGeneratorModel, custom_fk__email='a@b.com')
    generator_dict.assertEqual('a@b.com', obj.custom_fk.email)

dataset/ETHPy150Open vandersonmota/model_mommy/test/generic/tests/test_filling_fields.py FillingCustomFields.test_uses_generator_defined_on_settings_for_custom_foreignkey/VarMisuse@43/104 `self`->`generator_dict`