コード例 #1
0
 def test_collection_guid_not_found(self):
     collection = CollectionFactory()
     collection.collect_object(self.project, self.auth.user)
     with assert_raises(HTTPError) as exc_info:
         valid_project_helper(pid=collection._id, nid=collection._id)
     assert_equal(exc_info.exception.code, 404)
コード例 #2
0
ファイル: mixins.py プロジェクト: xlecours/osf.io
 def collection_without_provider(self, user_one, submission_one):
     c = CollectionFactory(creator=user_one)
     c.collect_object(submission_one, user_one)
     return c
コード例 #3
0
 def test_collection_guid_not_found(self):
     collection = CollectionFactory()
     collection.collect_object(self.project, self.auth.user)
     with assert_raises(HTTPError) as exc_info:
         valid_project_helper(pid=collection._id, nid=collection._id)
     assert_equal(exc_info.exception.code, 404)
コード例 #4
0
ファイル: mixins.py プロジェクト: xlecours/osf.io
 def collection_with_provider(self, user_one, submission_one):
     c = CollectionFactory(creator=user_one, status_choices=['asdf'])
     c.collect_object(submission_one, user_one, status='asdf')
     return c
コード例 #5
0
 def collection_without_provider(self, user_one, project_one):
     c = CollectionFactory(creator=user_one)
     c.collect_object(project_one, user_one)
     return c
コード例 #6
0
 def collection_with_provider(self, user_one, project_one):
     c = CollectionFactory(creator=user_one)
     c.collect_object(project_one, user_one, status='asdf')
     return c
コード例 #7
0
ファイル: mixins.py プロジェクト: CenterForOpenScience/osf.io
 def collection_with_provider(self, user_one, submission_one):
     c = CollectionFactory(creator=user_one, status_choices=['asdf'])
     c.collect_object(submission_one, user_one, status='asdf')
     return c
コード例 #8
0
 def collection_with_provider(self, user_one, project_one):
     c = CollectionFactory(creator=user_one)
     c.collect_object(project_one, user_one, status='asdf')
     return c