def test_get_agent_returns_none_if_no_unit_variable(self): assert databaseFunctions.getAgentForFileUUID("d4e599bd-f9ab-48d4-9ae7-9e87d4ac1619") is None
def test_get_agent_returns_none_for_invalid_uuid(self): assert databaseFunctions.getAgentForFileUUID('no such file') is None
def test_get_agent_fails_for_special_uuid_value(self): with pytest.raises(Exception) as excinfo: databaseFunctions.getAgentForFileUUID('None') assert "no file UUID provided" in str(excinfo.value)
def test_get_agent_prefers_sip_if_both_exist(self): agent_id = databaseFunctions.getAgentForFileUUID("dc569efe-c88f-4be3-94d3-d9eac0c5d410") assert agent_id == "sip_value"
def test_get_agent_for_file_with_transfer_agent(self): agent_id = databaseFunctions.getAgentForFileUUID("1f4af873-8d60-4907-a92e-d1889e643524") assert agent_id == "10"
def test_get_agent_for_file_with_sip_agent(self): agent_id = databaseFunctions.getAgentForFileUUID("88c8f115-80bc-4da4-a1e6-0158f5df13b9") assert agent_id == "5"