def test_fixtures_render(get, slug):
    with requests_mock.mock() as m:
        m.get(api_url + '/software_cache/%s' % slug,
              text=get_mock('software/%s.json' % slug))
        data, status_code = get('/software/xenon')
        assert status_code == 200
        assert isValidHTML(data)
Beispiel #2
0
def test_index(get):
    with requests_mock.mock() as m:
        m.get(api_url + '/software_cache?isPublished=true', text=get_mock('software_cache.json'))
        m.get(api_url + '/organization', text=get_mock('organization.json'))
        result = get('/')

    assert isValidHTML(result)
Beispiel #3
0
def test_live_software_data_renders(get):
    live_software_items = []
    result = requests.get(api_url + '/software?isPublished=True').json()
    slug = result[0]
    data, status_code = get('/software/%s' % slug)
    assert status_code == 200
    assert isValidHTML(data)
def test_live_software_data_renders(get, slug):
    try:
        data, status_code = get('/software/%s' % slug)
    except Exception as e:
        pytest.skip(str(e))
        return
    assert status_code == 200
    assert isValidHTML(data)
Beispiel #5
0
def test_index_live(get):
    result = get('/')

    assert isValidHTML(result)