moo.core.tests.test_bootstrap_sync
Tests for the idempotent bootstrap sync system.
Covers: - bootstrap.get_or_create_object() helper - bootstrap.initialize_dataset() idempotency - bootstrap.load_verbs() with replace=True - moo_init –sync management command
Functions
|
Parents are added when the object is newly created; not re-added on subsequent calls. |
First call creates the object and returns created=True. |
|
Second call returns the existing object without creating a duplicate. |
|
Calling initialize_dataset() on an already-bootstrapped DB does not create duplicates. |
|
load_verb_source() with replace=True updates in place without creating a duplicate. |
|
load_verbs() passes replace=True through to load_verb_source(). |
|
moo_init --sync raises RuntimeError when the dataset hasn't been initialised yet. |
|
moo_init --sync succeeds on an already-bootstrapped DB without raising. |