STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
test_checkout.py File Reference

Go to the source code of this file.

Namespaces

namespace  test_checkout

Functions

 test_checkout._isolate (tmp_path, monkeypatch)
 test_checkout.client ()
 test_checkout._create (client, headers=A, name="Feed system")
 test_checkout._free (client, doc_id, headers=A, params=None)
 test_checkout._share (client, doc_id, emails)
 test_checkout._save (client, doc_id, headers, params=None, config=None)
 test_checkout._race_take (barrier, results, root, doc_id, email, base, owner_param)
 test_checkout.test_only_one_of_many_simultaneous_takes_wins (client, tmp_path, attempt)
 test_checkout.test_holder_may_save_and_others_may_not (client)
 test_checkout.test_saving_without_taking_it_is_refused (client)
 test_checkout.test_every_content_write_needs_the_checkout (client, path, method, body)
 test_checkout.test_housekeeping_is_not_blocked_by_someone_elses_checkout (client, name, method, path, body)
 test_checkout.test_copying_is_not_blocked_by_a_checkout (client)
 test_checkout.test_a_checkout_lapses_and_the_next_person_can_take_it (client, monkeypatch)
 test_checkout.test_the_previous_holder_is_refused_rather_than_silently_overwriting (client, monkeypatch)
 test_checkout.test_saving_keeps_the_checkout_alive (client)
 test_checkout.test_release_is_idempotent_and_holder_only (client)
 test_checkout.test_the_list_reports_the_checkout_without_an_extra_call (client)
 test_checkout.test_designs_predating_checkouts_read_as_free (client, tmp_path)
 test_checkout._take_in_child (results, root, doc_id, base, owner_param, email)
 test_checkout.test_take_cannot_proceed_while_the_index_lock_is_held (client, tmp_path)
 test_checkout.test_creating_a_design_checks_it_out_to_you (client)
 test_checkout.test_copying_a_design_checks_the_copy_out_to_you (client)
 test_checkout.test_creating_does_not_touch_anyone_elses_checkout (client)
 test_checkout.test_every_endpoint_that_returns_a_record_returns_a_decorated_one (client)
 test_checkout.test_a_returned_record_says_the_design_is_yours (client)
 test_checkout.test_lock_expires_at_is_in_the_future (client)
 test_checkout.test_beat_refreshes_the_hold_without_writing (client)
 test_checkout.test_beat_refuses_when_you_do_not_hold_it (client)
 test_checkout.test_beat_alone_survives_the_ttl_but_idling_does_not (client, monkeypatch)
 test_checkout.test_a_lapsed_hold_nobody_took_is_reclaimed_by_its_holder (client, monkeypatch)
 test_checkout.test_a_lapsed_hold_someone_else_took_is_not_reclaimed (client, monkeypatch)

Variables

 test_checkout.reason
 test_checkout.app = FastAPI()
dict test_checkout.A = {"X-Auth-Email": "alice@berkeley.edu"}
dict test_checkout.B = {"X-Auth-Email": "bob@berkeley.edu"}
dict test_checkout.OWNER_A = {"owner": A["X-Auth-Email"]}
str test_checkout.BASE = "/api/engine/documents"
str test_checkout.APP_SEGMENT = "engine"
dict test_checkout.DECORATED = {"owner", "ownerName", "mine", "sharedWith", "lockedByMe"}