forked from p34709852/monkey
UT: Fix tests in test_file_agent_log_repository.py
This commit is contained in:
parent
8f46b3b9fd
commit
e374341ce1
|
@ -3,7 +3,7 @@ from uuid import UUID
|
|||
import pytest
|
||||
from tests.monkey_island import OpenErrorFileRepository, SingleFileRepository
|
||||
|
||||
from monkey_island.cc.repository import FileAgentLogRepository, RetrievalError, UnknownRecordError
|
||||
from monkey_island.cc.repository import FileAgentLogRepository, RetrievalError
|
||||
|
||||
LOG_CONTENTS = "lots of useful information"
|
||||
AGENT_ID = UUID("6bfd8b64-43d8-4449-8c70-d898aca74ad8")
|
||||
|
@ -22,7 +22,7 @@ def test_store_agent_log(repository):
|
|||
|
||||
|
||||
def test_get_agent_log__unknown_record_error(repository):
|
||||
with pytest.raises(UnknownRecordError):
|
||||
with pytest.raises(RetrievalError):
|
||||
repository.get_agent_log(AGENT_ID)
|
||||
|
||||
|
||||
|
@ -35,5 +35,5 @@ def test_get_agent_log__retrieval_error():
|
|||
def test_reset_agent_logs(repository):
|
||||
repository.upsert_agent_log(AGENT_ID, LOG_CONTENTS)
|
||||
repository.reset()
|
||||
with pytest.raises(UnknownRecordError):
|
||||
with pytest.raises(RetrievalError):
|
||||
repository.get_agent_log(AGENT_ID)
|
||||
|
|
Loading…
Reference in New Issue