@@ 193-202 (lines=10) @@ | ||
190 | assert db_run['captured_out'] == outp |
|
191 | ||
192 | ||
193 | def test_tinydb_observer_completed_event_updates_run(tinydb_obs, sample_run): |
|
194 | tinydb_obs.started_event(**sample_run) |
|
195 | ||
196 | tinydb_obs.completed_event(stop_time=T2, result=42) |
|
197 | ||
198 | assert len(tinydb_obs.runs) == 1 |
|
199 | db_run = tinydb_obs.runs.get(eid=1) |
|
200 | assert db_run['stop_time'] == T2 |
|
201 | assert db_run['result'] == 42 |
|
202 | assert db_run['status'] == 'COMPLETED' |
|
203 | ||
204 | ||
205 | def test_tinydb_observer_interrupted_event_updates_run(tinydb_obs, |
@@ 106-115 (lines=10) @@ | ||
103 | assert db_run['captured_out'] == outp |
|
104 | ||
105 | ||
106 | def test_mongo_observer_completed_event_updates_run(mongo_obs, sample_run): |
|
107 | mongo_obs.started_event(**sample_run) |
|
108 | ||
109 | mongo_obs.completed_event(stop_time=T2, result=42) |
|
110 | ||
111 | assert mongo_obs.runs.count() == 1 |
|
112 | db_run = mongo_obs.runs.find_one() |
|
113 | assert db_run['stop_time'] == T2 |
|
114 | assert db_run['result'] == 42 |
|
115 | assert db_run['status'] == 'COMPLETED' |
|
116 | ||
117 | ||
118 | def test_mongo_observer_interrupted_event_updates_run(mongo_obs, sample_run): |