summaryrefslogtreecommitdiff
path: root/tests/common/test_event.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/common/test_event.py')
-rw-r--r--tests/common/test_event.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/common/test_event.py b/tests/common/test_event.py
index 01bcd7b..d52d3e6 100644
--- a/tests/common/test_event.py
+++ b/tests/common/test_event.py
@@ -49,7 +49,8 @@ class TestEvent(AgentTestCase):
self.assertTrue(es.event_succeeded("Foo", "1.2", "FauxOperation"))
def test_event_status_records_status(self):
- es = event.EventStatus()
+ d = tempfile.mkdtemp()
+ es = event.EventStatus(tempfile.mkdtemp())
es.mark_event_status("Foo", "1.2", "FauxOperation", True)
self.assertTrue(es.event_succeeded("Foo", "1.2", "FauxOperation"))
@@ -69,7 +70,7 @@ class TestEvent(AgentTestCase):
self.assertFalse(es.event_succeeded("Foo", "1.2", "FauxOperation"))
def test_should_emit_event_ignores_unknown_operations(self):
- event.__event_status__ = event.EventStatus()
+ event.__event_status__ = event.EventStatus(tempfile.mkdtemp())
self.assertTrue(event.should_emit_event("Foo", "1.2", "FauxOperation", True))
self.assertTrue(event.should_emit_event("Foo", "1.2", "FauxOperation", False))
@@ -82,7 +83,7 @@ class TestEvent(AgentTestCase):
def test_should_emit_event_handles_known_operations(self):
- event.__event_status__ = event.EventStatus()
+ event.__event_status__ = event.EventStatus(tempfile.mkdtemp())
# Known operations always initially "fire"
for op in event.__event_status_operations__: