Exemple #1
0
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')
Exemple #2
0
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()]
Exemple #3
0
class ConferenceFactory(ModularOdmFactory):
    FACTORY_FOR = Conference

    endpoint = FakerAttribute('slug')
    name = FakerAttribute('catch_phrase')
    active = True