# Path: groups_manager/models.py
# def get_auth_models_sync_func_default(instance):
#     def group_model(self):
#     def group_member_model(self):
#     def __unicode__(self):
#     def __str__(self):
#     def save(self, *args, **kwargs):
#     def full_name(self):
#     def groups(self):
#     def has_perm(self, perm, obj=None):
#     def has_perms(self, perm_list, obj=None):
#     def assign_object(self, group, obj, **kwargs):
# def member_save(sender, instance, created, *args, **kwargs):
# def member_delete(sender, instance, *args, **kwargs):
#     def __unicode__(self):
#     def __str__(self):
#     def save(self, *args, **kwargs):
#     def groups(self):
#     def __unicode__(self):
#     def __str__(self):
#     def save(self, *args, **kwargs):
#     def groups(self):
#     def member_model(self):
#     def group_member_model(self):
#     def group_members_attribute(self):
#     def __unicode__(self):
#     def __str__(self):
#     def save(self, *args, **kwargs):
#     def _get_full_name(self):
#     def subgroups(self):
#     def get_members(self, subgroups=False):
#     def members(self):
#     def users(self):
#     def get_entities(self, subgroups=False):
#     def entities(self):
#     def add_member(self, member, roles=None, expiration_date=None):
#     def remove_member(self, member):
#     def assign_object(self, obj, **kwargs):
# def group_save(sender, instance, created, *args, **kwargs):
# def group_delete(sender, instance, *args, **kwargs):
#     def __unicode__(self):
#     def __str__(self):
#     def save(self, *args, **kwargs):
#     def __unicode__(self):
#     def __str__(self):
#     def assign_object(self, obj, **kwargs):
# def group_member_save(sender, instance, created, *args, **kwargs):
# def group_member_delete(sender, instance, *args, **kwargs):
# class MemberRelationsMixin(object):
#     class GroupsManagerMeta:
# class MemberMixin(MemberRelationsMixin, models.Model):
#     class Meta:
# class Member(MemberMixin):
#     class Meta(MemberMixin.Meta):
# class GroupTypeMixin(models.Model):
#     class Meta:
# class GroupType(GroupTypeMixin):
#     class Meta(GroupTypeMixin.Meta):
# class GroupEntityMixin(models.Model):
#     class Meta:
# class GroupEntity(GroupEntityMixin):
#     class Meta(GroupEntityMixin.Meta):
# class GroupRelationsMixin(object):
#     class GroupsManagerMeta:
# class GroupMixin(GroupRelationsMixin, MPTTModel):
#     class Meta:
#     class MPTTMeta:
#     class GroupsManagerMeta(GroupRelationsMixin.GroupsManagerMeta):
# class Group(GroupMixin):
#     class Meta(GroupMixin.Meta):
# class GroupMemberRoleMixin(models.Model):
#     class Meta:
# class GroupMemberRole(GroupMemberRoleMixin):
#     class Meta(GroupMemberRoleMixin.Meta):
# class GroupMemberMixin(models.Model):
#     class Meta:
# class GroupMember(GroupMemberMixin):
#     class Meta(GroupMemberMixin.Meta):
# 
# Path: groups_manager/exceptions_gm.py
# class MemberDjangoUserSyncError(BaseException):
# class GroupDjangoGroupSyncError(BaseException):
# class GroupNotSavedError(BaseException):
# class MemberNotSavedError(BaseException):
# class GetGroupMemberError(BaseException):
# class GetRoleError(BaseException):


from copy import deepcopy
from django.contrib.auth import models as auth_models
from django.test import TestCase
from groups_manager import models, exceptions_gm
from testproject import models as testproject_models
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
import re
import unittest
    import guardian
        'group': ['view', 'change'],
        'groups_upstream': ['view'],
        'groups_downstream': [],
        'groups_siblings': ['view'],
    },
}

random_end = re.compile(r'.*_[a-z0-9]{8}$')


class TestPermissions(TestCase):

    def setUp(self):
        pass

    def create_legions(self):
        """
        Sulla owns one Legion. There are three groups:
         - Gods, with Mars,
         - Consuls, which Sulla and Metellus Pius are part of,
         - Generals, which Marius is part of,
         - and Plebeians, that has no permissions.
         - Greeks, which Archelaus cannot see anything.
        Mario as General can see Sulla's Legion, and Plebeians neither; Gods can see anything, and
        Metellus Pius has full acess too.
        Gods -|- Consuls - Plebeians
              |- Generals
        Greeks
        """
        settings.GROUPS_MANAGER = deepcopy(GROUPS_MANAGER_MOCK)

# Path: groups_manager/models.py
# def get_auth_models_sync_func_default(instance):
#     def group_model(self):
#     def group_member_model(self):
#     def __unicode__(self):
#     def __str__(self):
#     def save(self, *args, **kwargs):
#     def full_name(self):
#     def groups(self):
#     def has_perm(self, perm, obj=None):
#     def has_perms(self, perm_list, obj=None):
#     def assign_object(self, group, obj, **kwargs):
# def member_save(sender, instance, created, *args, **kwargs):
# def member_delete(sender, instance, *args, **kwargs):
#     def __unicode__(self):
#     def __str__(self):
#     def save(self, *args, **kwargs):
#     def groups(self):
#     def __unicode__(self):
#     def __str__(self):
#     def save(self, *args, **kwargs):
#     def groups(self):
#     def member_model(self):
#     def group_member_model(self):
#     def group_members_attribute(self):
#     def __unicode__(self):
#     def __str__(self):
#     def save(self, *args, **kwargs):
#     def _get_full_name(self):
#     def subgroups(self):
#     def get_members(self, subgroups=False):
#     def members(self):
#     def users(self):
#     def get_entities(self, subgroups=False):
#     def entities(self):
#     def add_member(self, member, roles=None, expiration_date=None):
#     def remove_member(self, member):
#     def assign_object(self, obj, **kwargs):
# def group_save(sender, instance, created, *args, **kwargs):
# def group_delete(sender, instance, *args, **kwargs):
#     def __unicode__(self):
#     def __str__(self):
#     def save(self, *args, **kwargs):
#     def __unicode__(self):
#     def __str__(self):
#     def assign_object(self, obj, **kwargs):
# def group_member_save(sender, instance, created, *args, **kwargs):
# def group_member_delete(sender, instance, *args, **kwargs):
# class MemberRelationsMixin(object):
#     class GroupsManagerMeta:
# class MemberMixin(MemberRelationsMixin, models.Model):
#     class Meta:
# class Member(MemberMixin):
#     class Meta(MemberMixin.Meta):
# class GroupTypeMixin(models.Model):
#     class Meta:
# class GroupType(GroupTypeMixin):
#     class Meta(GroupTypeMixin.Meta):
# class GroupEntityMixin(models.Model):
#     class Meta:
# class GroupEntity(GroupEntityMixin):
#     class Meta(GroupEntityMixin.Meta):
# class GroupRelationsMixin(object):
#     class GroupsManagerMeta:
# class GroupMixin(GroupRelationsMixin, MPTTModel):
#     class Meta:
#     class MPTTMeta:
#     class GroupsManagerMeta(GroupRelationsMixin.GroupsManagerMeta):
# class Group(GroupMixin):
#     class Meta(GroupMixin.Meta):
# class GroupMemberRoleMixin(models.Model):
#     class Meta:
# class GroupMemberRole(GroupMemberRoleMixin):
#     class Meta(GroupMemberRoleMixin.Meta):
# class GroupMemberMixin(models.Model):
#     class Meta:
# class GroupMember(GroupMemberMixin):
#     class Meta(GroupMemberMixin.Meta):
# 
# Path: groups_manager/exceptions_gm.py
# class MemberDjangoUserSyncError(BaseException):
# class GroupDjangoGroupSyncError(BaseException):
# class GroupNotSavedError(BaseException):
# class MemberNotSavedError(BaseException):
# class GetGroupMemberError(BaseException):
# class GetRoleError(BaseException):


# Path: testproject/testproject/tests.py
from copy import deepcopy
from django.contrib.auth import models as auth_models
from django.test import TestCase
from groups_manager import models, exceptions_gm
from testproject import models as testproject_models
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
        from groups_manager import settings
import re
import unittest
    import guardian

        'group': ['view', 'change'],
        'groups_upstream': ['view'],
        'groups_downstream': [],
        'groups_siblings': ['view'],
    },
}

random_end = re.compile(r'.*_[a-z0-9]{8}$')


class TestPermissions(TestCase):

    def setUp(self):
        pass

    def create_legions(self):
        """
        Sulla owns one Legion. There are three groups:
         - Gods, with Mars,
         - Consuls, which Sulla and Metellus Pius are part of,
         - Generals, which Marius is part of,
         - and Plebeians, that has no permissions.
         - Greeks, which Archelaus cannot see anything.
        Mario as General can see Sulla's Legion, and Plebeians neither; Gods can see anything, and
        Metellus Pius has full acess too.
        Gods -|- Consuls - Plebeians
              |- Generals
        Greeks
        """
        settings.GROUPS_MANAGER = deepcopy(GROUPS_MANAGER_MOCK)

        self.mars = models.Member.objects.create(first_name='Mars', last_name='Gradivus')