• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python base.OsfTestCase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中tests.base.OsfTestCase的典型用法代码示例。如果您正苦于以下问题:Python OsfTestCase类的具体用法?Python OsfTestCase怎么用?Python OsfTestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了OsfTestCase类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: setUp

 def setUp(self):
     OsfTestCase.setUp(self)
     self.user = UserFactory()
     self.node = ProjectFactory(creator=self.user)
     self.citation = AlternativeCitation(name='name', text='text')
     self.citation.save()
     self.node.alternative_citations.add(self.citation)
开发者ID:adlius,项目名称:osf.io,代码行数:7,代码来源:test_alternative_citations.py


示例2: setUp

 def setUp(self):
     OsfTestCase.setUp(self)
     self.node = NodeFactory()
     self.node.add_addon('figshare', auth=Auth(self.node.creator))
     self.node.save()
     self.node_settings = self.node.get_addon('figshare')
     self.client = Figshare()
开发者ID:AndrewSallans,项目名称:osf.io,代码行数:7,代码来源:test_api.py


示例3: setUp

    def setUp(self):
        OsfTestCase.setUp(self)

        self.user = AuthUserFactory()
        self.me = AuthUserFactory()
        self.project = ProjectFactory(creator=self.me, is_public=True, title=fake.bs())
        self.component = NodeFactory(creator=self.me, project=self.project, is_public=True, title=fake.bs())
开发者ID:baylee-d,项目名称:osf.io,代码行数:7,代码来源:webtest_tests.py


示例4: setUp

 def setUp(self):
     OsfTestCase.setUp(self)
     self.user = UserFactory()
     self.node = ProjectFactory(creator=self.user)
     self.citation = AlternativeCitation(name="name", text="text")
     self.citation.save()
     self.node.alternative_citations.append(self.citation)
开发者ID:ubiquitypress,项目名称:osf.io,代码行数:7,代码来源:test_alternative_citations.py


示例5: setUp

 def setUp(self, *args, **kwargs):
     OsfTestCase.setUp(self, *args, **kwargs)
     if not self.kind:
         return
     self.sanction = self.Factory()
     self.reg = Node.find_one(Q(self.Model.SHORT_NAME, 'eq', self.sanction))
     self.user = self.reg.creator
开发者ID:rmoorman,项目名称:osf.io,代码行数:7,代码来源:test_tokens.py


示例6: setUp

 def setUp(self, *args, **kwargs):
     OsfTestCase.setUp(self, *args, **kwargs)
     if not self.kind:
         return
     self.sanction = self.Factory()
     self.reg = AbstractNode.objects.get(Q(**{self.Model.SHORT_NAME: self.sanction}))
     self.user = self.reg.creator
开发者ID:CenterForOpenScience,项目名称:osf.io,代码行数:7,代码来源:test_tokens.py


示例7: setUp

 def setUp(self):
     OsfTestCase.setUp(self)
     self.user_settings = AddonGitHubUserSettings()
     self.oauth_settings = AddonGitHubOauthSettings()
     self.oauth_settings.github_user_id = 'testuser'
     self.oauth_settings.save()
     self.user_settings.oauth_settings = self.oauth_settings
     self.user_settings.save()
开发者ID:AllisonLBowers,项目名称:osf.io,代码行数:8,代码来源:test_models.py


示例8: setUp

 def setUp(self):
     OsfTestCase.setUp(self)
     self.user = UserFactory()
     self.user.add_addon('github')
     self.user_settings = self.user.get_addon('github')
     self.external_account = GitHubAccountFactory()
     self.user_settings.owner.external_accounts.append(self.external_account)
     self.user_settings.owner.save()
     self.node_settings = GitHubNodeSettingsFactory(user_settings=self.user_settings)
开发者ID:545zhou,项目名称:osf.io,代码行数:9,代码来源:test_models.py


示例9: setUp

 def setUp(self):
     OsfTestCase.setUp(self)
     self.visible_contrib = AuthUserFactory()
     visible_contrib2 = AuthUserFactory(given_name=u'ヽ༼ ಠ益ಠ ༽ノ', family_name=u'ლ(´◉❥◉`ლ)')
     self.invisible_contrib = AuthUserFactory()
     self.node = RegistrationFactory(is_public=True)
     self.identifier = Identifier(referent=self.node, category='catid', value='cat:7')
     self.node.add_contributor(self.visible_contrib, visible=True)
     self.node.add_contributor(self.invisible_contrib, visible=False)
     self.node.add_contributor(visible_contrib2, visible=True)
     self.node.save()
开发者ID:adlius,项目名称:osf.io,代码行数:11,代码来源:test_identifiers.py


示例10: setUp

    def setUp(self):
        OsfTestCase.setUp(self)
        self.user = UserFactory()

        self.public = ProjectFactory(is_public=True)
        self.public_component = NodeFactory(parent=self.public, is_public=True)
        self.private = ProjectFactory(is_public=False)
        self.deleted = ProjectFactory(is_public=True, is_deleted=True)

        for node in (self.public, self.public_component, self.private, self.deleted):
            node.add_contributor(self.user, auth=Auth(node.creator))
            node.save()
开发者ID:adlius,项目名称:osf.io,代码行数:12,代码来源:test_serializers.py


示例11: setUp

 def setUp(self):
     OsfTestCase.setUp(self)
     self.user = UserFactory()
     self.user.add_addon("github")
     self.user_settings = self.user.get_addon("github")
     self.oauth_settings = AddonGitHubOauthSettings(oauth_access_token="foobar")
     self.oauth_settings.github_user_id = "testuser"
     self.oauth_settings.save()
     self.user_settings.oauth_settings = self.oauth_settings
     self.user_settings.save()
     self.node_settings = AddonGitHubNodeSettings(
         owner=ProjectFactory(), user="chrisseto", repo="openpokemon", user_settings=self.user_settings
     )
     self.node_settings.save()
开发者ID:rdhyee,项目名称:osf.io,代码行数:14,代码来源:test_models.py


示例12: setUp

 def setUp(self):
     OsfTestCase.setUp(self)
     self.project = ProjectFactory()
开发者ID:AndrewSallans,项目名称:osf.io,代码行数:3,代码来源:test_osffiles.py


示例13: setUp

 def setUp(self):
     OsfTestCase.setUp(self)
     self.user = factories.AuthUserFactory()
     self.user.is_registered = True
     self.user.save()
开发者ID:545zhou,项目名称:osf.io,代码行数:5,代码来源:test_mails.py


示例14: setUp

 def setUp(self):
     OsfTestCase.setUp(self)
     self.referrer = UserFactory()
     self.project = ProjectFactory(creator=self.referrer)
开发者ID:545zhou,项目名称:osf.io,代码行数:4,代码来源:clear_invalid_unclaimed_records.py


示例15: setUp

 def setUp(self):
     OsfTestCase.setUp(self)
     self.base_url = 'http://accounts.test.test'
     self.client = cas.CasClient(self.base_url)
开发者ID:AllisonLBowers,项目名称:osf.io,代码行数:4,代码来源:test_cas_authentication.py


示例16: tearDown

 def tearDown(self):
     OsfTestCase.tearDown(self)
     Node.remove()
开发者ID:545zhou,项目名称:osf.io,代码行数:3,代码来源:test_migrate_registration_and_fork_log.py


示例17: setUp

 def setUp(self):
     OsfTestCase.setUp(self)
     tag = TagFactory()
     self.target_guid = Guid(referent=tag)
     self.target_guid.save()
     self.nontarget_guid = Guid(referent=NodeFactory())
开发者ID:545zhou,项目名称:osf.io,代码行数:6,代码来源:fix_tag_guids.py



注:本文中的tests.base.OsfTestCase类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python base.TestWSGIController类代码示例发布时间:2022-05-27
下一篇:
Python base.BaseTestCase类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap