예제 #1
0
def test_add_item(happi_client: Client, valve: OphydItem):
    happi_client.add_item(valve)
    # No duplicates
    with pytest.raises(DuplicateError):
        happi_client.add_item(valve)
    # No incompletes
    d = OphydItem()
    with pytest.raises(EntryError):
        happi_client.add_item(d)
예제 #2
0
def valve(valve_info: Dict[str, Any]) -> OphydItem:
    return OphydItem(**valve_info)
예제 #3
0
def item(item_info: Dict[str, Any]) -> OphydItem:
    return OphydItem(**item_info)
예제 #4
0
파일: conftest.py 프로젝트: untzag/happi
def valve(valve_info):
    t = OphydItem(**valve_info)
    return t
예제 #5
0
파일: conftest.py 프로젝트: untzag/happi
def device(device_info):
    t = OphydItem(**device_info)
    return t