# Path: backend/flindt/role/tests/factories.py
# class RoleFactory(factory.django.DjangoModelFactory):
#     name = LazyAttribute(lambda o: faker.word())
#     purpose = LazyAttribute(lambda o: faker.bs())
# 
#     @factory.post_generation
#     def users(self, create, extracted, **kwargs):
#         if create:
#             # Get all users, convert to list, shuffle and get between 1 and 6 users.
#             users = list(User.objects.all())
#             random.shuffle(users)
#             self.users.add(*users[:random.randint(1, 6)])
# 
#     class Meta:
#         model = Role


from django.test import TestCase
from .factories import RoleFactory



class RoleTestCase(TestCase):
    """
    Used to confirm the correct behaviour of Role methods.
    """

    def setUp(self):
        self.anchor_circle = RoleFactory()

# Path: backend/flindt/role/tests/factories.py
# class RoleFactory(factory.django.DjangoModelFactory):
#     name = LazyAttribute(lambda o: faker.word())
#     purpose = LazyAttribute(lambda o: faker.bs())
# 
#     @factory.post_generation
#     def users(self, create, extracted, **kwargs):
#         if create:
#             # Get all users, convert to list, shuffle and get between 1 and 6 users.
#             users = list(User.objects.all())
#             random.shuffle(users)
#             self.users.add(*users[:random.randint(1, 6)])
# 
#     class Meta:
#         model = Role


# Path: backend/flindt/role/tests/test_models.py
from django.test import TestCase
from .factories import RoleFactory




class RoleTestCase(TestCase):
    """
    Used to confirm the correct behaviour of Role methods.
    """

    def setUp(self):
        self.anchor_circle = RoleFactory()

        self.circle = RoleFactory(parent=self.anchor_circle)