def test_encounter_slots(session):
 version_group_a = aliased(tables.VersionGroup)
 version_group_b = aliased(tables.VersionGroup)
 sanity_q = session.query(tables.Encounter).join((tables.EncounterSlot, tables.Encounter.slot)).join((version_group_a, tables.EncounterSlot.version_group)).join((tables.Version, tables.Encounter.version)).join((version_group_b, tables.Version.version_group)).filter((version_group_a.id != version_group_b.id))
 assert (sanity_q.count() == 0)

def test_encounter_slots ( session ) : version_group_a = aliased ( tables . VersionGroup ) version_group_b = aliased ( tables . VersionGroup ) sanity_q = session . query ( tables . Encounter ) . join ( ( tables . EncounterSlot , tables . Encounter . slot ) ) . join ( ( version_group_a , tables . EncounterSlot . version_group ) ) . join ( ( tables . Version , tables . Encounter . version ) ) . join ( ( version_group_b , tables . Version . version_group ) ) . filter ( ( version_group_a . id != version_group_b . id ) ) assert ( sanity_q . count ( ) == 0 )
encounters have a version .