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)
def valve(valve_info: Dict[str, Any]) -> OphydItem: return OphydItem(**valve_info)
def item(item_info: Dict[str, Any]) -> OphydItem: return OphydItem(**item_info)
def valve(valve_info): t = OphydItem(**valve_info) return t
def device(device_info): t = OphydItem(**device_info) return t