Exemplo n.º 1
0
def test_plan_validate_with_no_errors(session):
    """An easy to pass test.

    A plan that is complete should always pass the validation method.
    """
    session.set_verbose(True)
    plan = session.Plan.one(query='status != "planning"')
    assert plan
    canvas = Planner(plan)
    canvas.validate()
Exemplo n.º 2
0
def test_set_output_and_propogate(session):
    session.set_verbose(True)
    canvas = Planner(session)
    ops = canvas.chain(
        "Rehydrate Primer",
        "Make PCR Fragment",
        "Run Gel",
        "Extract Gel Slice",
        "Purify Gel Slice",
        "Assemble Plasmid",
        category="Cloning",
    )

    example_fragment = session.Sample.find_by_name("SV40-dCas9-split")
    canvas.set_output_sample(
        ops[1].outputs[0],
        sample=example_fragment,
        setter=canvas.set_field_value_and_propogate,
    )

    canvas.validate()