def setup(data): project.using_project('general') actions.store('dir', actions.random_str()) project.create_page_directory(data.project, data.dir) data.page_name = actions.random_str() actions.store('page_full', '{}.{}'.format(data.dir, data.page_name)) project.create_page(data.project, data.page_full)
def test_create_page_directory_exists(data): dir_name = actions.random_str() project.create_page_directory(data.project, dir_name) response = project.create_page_directory(data.project, dir_name) assert response.json()['errors'] == [ 'A directory with that name already exists' ]
def setup(data): project.using_project('general') data.dir = actions.random_str() data.page_name = actions.random_str() data.page_full = '{}.{}'.format(data.dir, data.page_name) project.create_page_directory(data.project, data.dir) project.create_page(data.project, data.page_full)
def setup(data): project.using_project('general') actions.store('dir_name', actions.random_str()) project.create_page_directory(data.project, data.dir_name)
def test(data): response = project.create_page_directory(data.project, data.dir_name) assert response.json()['errors'] == [ 'A directory with that name already exists' ]
def test_create_page_directory(data): response = project.create_page_directory(data.project, actions.random_str()) assert response.status_code == 200 assert response.json()['errors'] == []
def create_dir(project_name, dirname): project_api.create_page_directory(project_name, dirname)
def setup(data): project.using_project('general') data.dir = actions.random_str() project.create_page_directory(data.project, data.dir)