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)
Beispiel #2
0
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)
Beispiel #3
0
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)
Beispiel #4
0
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)
Beispiel #8
0
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
Beispiel #9
0
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
Beispiel #10
0
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())
Beispiel #11
0
def setup(data):
    project.using_project('general')
    data.page = project.create_random_page(data.project)
Beispiel #12
0
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)
Beispiel #13
0
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'))
Beispiel #14
0
def setup(data):
    project.using_project('general')
    data.suite = project.create_random_suite(data.project)
Beispiel #15
0
def setup(data):
    project.using_project('general')
    data.test_one = project.create_random_test(data.project)
Beispiel #16
0
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'))
Beispiel #18
0
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)