Write comprehensive unit tests for the survey prioritization logic as described in the GSoC survey feature issue (#819). Unit tests should cover all combinations of the prioritization rules, including survey visibility, completion status, 'always_visible', and 'allows_multiple_responses' flags.
Reference: GSoC Survey Feature Issue #819