コード例 #1
0
ファイル: test_regulation.py プロジェクト: kkarra/SGDBackend
def test_regulation_paragraph_structure(model, identifier='GAL4'):
    response = json.loads(model.locus(locus_identifier=identifier))
    paragraph = response['regulation_overview']['paragraph']
    if paragraph is not None:
        assert 'text' in paragraph
        assert 'references' in paragraph
        for reference in paragraph['references']:
            check_reference(reference)
コード例 #2
0
ファイル: test_literature.py プロジェクト: kkarra/SGDBackend
def test_literature_bioent_details_structure(model, identifier='YFL039C'):
    response = json.loads(model.literature_details(locus_identifier=identifier))
    assert response is not None
    assert 'primary' in response
    assert 'additional' in response
    assert 'review' in response
    assert 'phenotype' in response
    assert 'go' in response
    assert 'interaction' in response
    assert 'regulation' in response

    for entry in response['primary']:
        check_reference(entry)
    for entry in response['additional']:
        check_reference(entry)
    for entry in response['review']:
        check_reference(entry)
    for entry in response['phenotype']:
        check_reference(entry)
    for entry in response['go']:
        check_reference(entry)
    for entry in response['interaction']:
        check_reference(entry)
    for entry in response['regulation']:
        check_reference(entry)