예제 #1
0
 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()
예제 #2
0
    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, parent=self.project, is_public=True, title=fake.bs())
예제 #3
0
 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)
 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)
예제 #5
0
 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
예제 #6
0
 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
예제 #7
0
 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
 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)
예제 #9
0
    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())
예제 #10
0
 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
예제 #11
0
 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()
예제 #12
0
 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()
예제 #13
0
 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)
예제 #14
0
 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()
예제 #15
0
 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)
예제 #16
0
 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()
예제 #17
0
    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()
예제 #18
0
    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()
예제 #19
0
 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="******", repo="openpokemon", user_settings=self.user_settings
     )
     self.node_settings.save()
예제 #20
0
 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='******',
         repo='openpokemon',
         user_settings=self.user_settings,
     )
     self.node_settings.save()
예제 #21
0
 def setUp(self):
     OsfTestCase.setUp(self)
     self.user = UserFactory()
예제 #22
0
 def setUp(self):
     OsfTestCase.setUp(self)
     self.user = factories.AuthUserFactory()
     self.user.is_registered = True
     self.user.save()
예제 #23
0
 def setUp(self):
     OsfTestCase.setUp(self)
     self.project = ProjectFactory()
예제 #24
0
 def setUp(self):
     OsfTestCase.setUp(self)
     self.user = factories.AuthUserFactory()
     self.user.is_registered = True
     self.user.save()
예제 #25
0
 def setUp(self):
     OsfTestCase.setUp(self)
     self.project = ProjectFactory()
 def setUp(self):
     OsfTestCase.setUp(self)
     self.referrer = UserFactory()
     self.project = ProjectFactory(creator=self.referrer)
예제 #27
0
 def tearDown(self):
     OsfTestCase.tearDown(self)
     Node.remove()
 def setUp(self):
     OsfTestCase.setUp(self)
     self.base_url = 'http://accounts.test.test'
     self.client = cas.CasClient(self.base_url)
 def setUp(self):
     OsfTestCase.setUp(self)
     self.user = UserFactory()
 def tearDown(self):
     OsfTestCase.tearDown(self)
     Node.remove()
예제 #31
0
 def setUp(self):
     OsfTestCase.setUp(self)
     self.base_url = 'http://accounts.test.test'
     self.client = cas.CasClient(self.base_url)
 def setUp(self):
     OsfTestCase.setUp(self)
     self.referrer = UserFactory()
     self.project = ProjectFactory(creator=self.referrer)
예제 #33
0
 def setUp(self):
     OsfTestCase.setUp(self)
     tag = TagFactory()
     self.target_guid = Guid(referent=tag)
     self.target_guid.save()
     self.nontarget_guid = Guid(referent=NodeFactory())
예제 #34
0
 def setUp(self):
     OsfTestCase.setUp(self)
     tag = TagFactory()
     self.target_guid = Guid(referent=tag)
     self.target_guid.save()
     self.nontarget_guid = Guid(referent=NodeFactory())