def setup(data): project.using_project('general') actions.store('dir', actions.random_str()) actions.store('test_name', actions.random_str()) actions.store('test', '{}.{}'.format(data.dir, data.test_name)) project.create_test_directory(data.project, data.dir) project.create_test(data.project, data.test)
def setup(data): project.using_project('general') data.suite = project.create_random_suite(data.project) response = suite.run_suite(data.project, data.suite) data.timestamp = response.json() report.wait_for_execution_to_finish(data.project, data.suite, data.timestamp)
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', 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 setup(data): project.using_project('general') data.suite = project.create_random_suite(data.project) data.test = project.create_random_test(data.project) suite.save_suite(data.project, data.suite, tests=[data.test]) response = suite.run_suite(data.project, data.suite) actions.store('timestamp', response.json())
def setup(data): project.using_project('general') actions.store('dir_one', actions.random_str()) actions.store('dir_two', '{}.{}'.format(actions.random_str(), actions.random_str())) project.create_test_directory(data.project, data.dir_one) project.create_test_directory(data.project, data.dir_two)
def setup(data): project.using_project('general') data.suite = project.create_random_suite(data.project) data.test_name = project.create_random_test(data.project) suite.save_suite(data.project, data.suite, tests=[data.test_name]) response = suite.run_suite(data.project, data.suite) actions.store('timestamp', response.json()) report.wait_for_execution_to_finish(data.project, data.suite, data.timestamp)
def test_get_user(data): project.using_project('general') standard = user_factory.create_user_if('general__standard') response = users.get_user(standard['username']) assert response.status_code == 200 assert response.json()['projects'] == {'general': 'standard'} assert response.json()['username'] == standard['username'] assert response.json()['email'] is None assert response.json()['is_superuser'] is False
def test_get_users(data): project.using_project('general') standard = user_factory.create_user_if('general__standard') response = users.get_users() assert response.status_code == 200 filtered = [ u for u in response.json() if u['username'] == standard['username'] ] assert len(filtered) == 1 assert filtered[0]['projects'] == {'general': 'standard'} assert filtered[0]['is_superuser'] is False
def setup(data): project.using_project('general') data.test = project.create_random_test(data.project) response = test_.run_test(data.project, data.test) actions.store('timestamp', response.json())
def setup(data): project.using_project('general') data.page = project.create_random_page(data.project)
def setup(data): project.using_project('general') data.test_one = project.create_random_test(data.project) data.test_two = '{}.{}'.format(actions.random_str(), actions.random_str()) project.create_test(data.project, data.test_two)
def setup(data): project.using_project('general') data.page = project.create_random_page(data.project) actions.store('user', user_factory.create_user_if('general__standard'))
def setup(data): project.using_project('general') data.suite = project.create_random_suite(data.project)
def setup(data): project.using_project('general') data.test_one = project.create_random_test(data.project)
def setup(data): project.using_project('general') actions.store('dir', actions.random_str()) project.create_suite_directory(data.project, data.dir)
def setup(data): project.using_project('general') actions.store('user', user_factory.create_user_if('general__read-only'))
def setup(data): project.using_project('general')
def setup(data): project.using_project('general') data.dir = actions.random_str() project.create_page_directory(data.project, data.dir)