13 lines
365 B
Python
13 lines
365 B
Python
from secretsanta.domain import Group
|
|
from tests.unit.conftest import GroupFactory
|
|
|
|
|
|
def test_pair(group):
|
|
group.pairs = Group.pair(group.participants)
|
|
|
|
assert len(group.pairs) == len(
|
|
group.participants
|
|
), "Number of pairs does not match participants"
|
|
|
|
for k, v in group.pairs.items():
|
|
assert k != v, "Self-pairings are not allowed"
|