Пример #1
0
def test__boilerplate__search(client, faker):
    user = login(client, faker)
    resp = get_and_assert_standards(client,
                                    url_for('search'),
                                    user,
                                    has_form=True)
    assert__search_html(resp.soup, clear_url=url_for('search'))
Пример #2
0
def _get(client, url, loggedin_user, study):
    resp = get_and_assert_standards(client, url, loggedin_user)

    assert__search_html(resp.soup, clear_url=_url(study_id=study.id))
    assert resp.soup.find('a', string="Upload Data", href=url_for('ui.upload_data', study_id=study.id)) is not None
    assert resp.soup.find("h1", string="{} Uploads".format(study.name)) is not None

    return resp
Пример #3
0
def _get(client, url, loggedin_user, has_form):
    resp = lbrc_services_get(client, url, loggedin_user, has_form)

    assert__search_html(resp.soup, clear_url=_url(external=False))

    assert__select(soup=resp.soup,
                   id='service_id',
                   options=_get_service_choices())
    assert__select(soup=resp.soup,
                   id='task_status_type_id',
                   options=_get_combined_task_status_type_choices())

    return resp
Пример #4
0
def _get(client, url, loggedin_user, study):
    resp = get_and_assert_standards(client, url, loggedin_user)

    assert__search_html(resp.soup,
                        clear_url=_url(_external=False, study_id=study.id))
    assert resp.soup.find('input', type="checkbox",
                          id='showCompleted') is not None
    assert resp.soup.find('a',
                          string="Download Upload Details",
                          href=url_for('ui.study_csv',
                                       study_id=study.id)) is not None
    assert resp.soup.find("h1",
                          string="{} Uploads".format(study.name)) is not None

    return resp