class GitHubOauthSettingsFactory(ModularOdmFactory): FACTORY_FOR = model.AddonGitHubOauthSettings oauth_access_token = FakerAttribute('md5') oauth_token_type = None github_user_id = FakerAttribute('sha1') github_user_name = FakerAttribute('domain_word')
class ConferenceFactory(ModularOdmFactory): FACTORY_FOR = Conference endpoint = Sequence(lambda n: 'conference{0}'.format(n)) name = FakerAttribute('catch_phrase') active = True @post_generation def admins(self, create, extracted, **kwargs): self.admins = extracted or [UserFactory()]
class ConferenceFactory(ModularOdmFactory): FACTORY_FOR = Conference endpoint = FakerAttribute('slug') name = FakerAttribute('catch_phrase') active = True