mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-29 01:23:58 +08:00
Use an explicit failure for unapproved capture in source tests
This commit is contained in:
@@ -121,9 +121,12 @@ def test_actual_daemon_reports_startup_source_refusal_without_issuing_a_trial(mo
|
||||
actor.interrupt = lambda reason, **kw: setattr(actor, 'reason', reason)
|
||||
fitter.cancel = lambda reason: None
|
||||
control_socket, output_socket = object(), object()
|
||||
def forbid_capture() -> None:
|
||||
raise AssertionError('Unapproved source must not enable capture')
|
||||
|
||||
adapter = SimpleNamespace(event_collection=True, source_plant_protocol='declared-unit-source-refusal',
|
||||
source_plant_clock=None, current_physical_valid=False, last_physical_ns=0,
|
||||
enable_original_context_capture=lambda: pytest.fail('Unapproved source must not enable capture'))
|
||||
enable_original_context_capture=forbid_capture)
|
||||
|
||||
def drain(socket, callback, receive, sink, stamp):
|
||||
if socket is control_socket:
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"protected_inventory_sha256": "ac0cf4cf939479db936d9115793ab3e3c391302a45ec17b2bc254a267b793774", "schema_version": 1}
|
||||
{"protected_inventory_sha256": "bdeadd377e632f887771199b4e2a9c411ba7ed32cc69b0ce46e3e43847dc216b", "schema_version": 1}
|
||||
|
||||
Reference in New Issue
Block a user