Пример #1
0
def test_microbial_samples_to_status(microbial_order_to_submit):
    # GIVEN microbial order with three samples

    # WHEN parsing for status
    data = StatusHandler.microbial_samples_to_status(microbial_order_to_submit)

    # THEN it should pick out samples and relevant information
    assert len(data["samples"]) == 5
    assert data["customer"] == "cust002"
    assert data["order"] == "Microbial samples"
    assert data["comment"] == "Order comment"

    # THEN first sample should contain all the relevant data from the microbial order
    sample_data = data["samples"][0]
    assert sample_data.get("priority") in "research"
    assert sample_data["name"] == "all-fields"
    assert sample_data.get("internal_id") is None
    assert sample_data["organism_id"] == "M.upium"
    assert sample_data["reference_genome"] == "NC_111"
    assert sample_data["application"] == "MWRNXTR003"
    assert sample_data["data_analysis"] == "fastq"
    assert sample_data["comment"] == "plate comment"
Пример #2
0
def microbial_status_data(microbial_order_to_submit):
    """Parse microbial order example."""
    data = StatusHandler.microbial_samples_to_status(microbial_order_to_submit)
    return data