Example #1
0
def public_project(session):
    if settings.PRODUCTION:
        raise ValueError(
            'You should not create public projects on production!')
    project = osf_api.create_project(session,
                                     title='OSF Test Project',
                                     public=True)
    yield project
    project.delete()
Example #2
0
def default_project(session):
    """Creates a new project through the api and returns it. Deletes the project at the end of the test run.
     If PREFERRED_NODE is set, returns the APIDetail of preferred node.
     """
    if settings.PREFERRED_NODE:
        yield osf_api.get_node(session)
    else:
        project = osf_api.create_project(session, title='OSF Test Project')
        yield project
        project.delete()
 def project_one(self, session):
     project_one = osf_api.create_project(session, title='&&aaaaaa')
     yield project_one
     project_one.delete()
 def project_three(self, session):
     project_three = osf_api.create_project(session, title='&&aaaaac')
     yield project_three
     project_three.delete()
 def project_two(self, session):
     project_two = osf_api.create_project(session, title='&&aaaabb')
     yield project_two
     project_two.delete()