moo.core.tests.test_multi_universe
Tests for multi-universe support via Django Sites.
Covers the full PR-description test plan plus regressions for the avatar-hijack hole and the migration backfill step.
Functions
|
A non-unique object with the same name+site cannot be hijacked as a wizard avatar. |
|
|
Integer-PK lookup is site-scoped: a PK from site1 is invisible from site2. |
|
Reproduce the migration RunPython step: rows with site=NULL get SITE_ID. |
|
|
|
A property value referring to another site's PK decodes as $nothing. |
|
|
Deserializing an Object ref outside any site context returns the original object, not |
A Django superuser without a UniversalWizard record gets nothing on connect. |
|
|
Object.save() fills site in priority order: context > caller > default SITE_ID. |
No suffix means defer to picker — |
|
An unknown suffix leaves |
|
A username suffix matching a Site domain selects that Site. |
|
|
Default SITE_ID=1 flow: lookup, save, and create all behave as before. |
If |
|
|
|
|
|
|
Each site has its own System Object, Wizard, and hierarchy. |
A UniversalWizard user gets a wizard avatar+Player on first connect; a second call is a no-op. |