Пример #1
0
    def setUp(self):
        # Inert signals before setup begins
        with mock.patch(
                MODULE_PATH +
                '.signals.trigger_all_ts_update') as trigger_all_ts_update:
            self.member = 'member_user'
            member = AuthUtils.create_member(self.member)
            Teamspeak3User.objects.create(user=member,
                                          uid=self.member,
                                          perm_key='123ABC')
            self.blue = 'blue_user'
            blue = AuthUtils.create_blue(self.blue)
            Teamspeak3User.objects.create(user=blue,
                                          uid=self.blue,
                                          perm_key='456DEF')
            self.none_user = '******'
            none_user = AuthUtils.create_user(self.none_user)

            ts_member_group = TSgroup.objects.create(ts_group_id=1,
                                                     ts_group_name='Member')
            ts_blue_group = TSgroup.objects.create(ts_group_id=2,
                                                   ts_group_name='Blue')
            m2m_member_group = AuthTS.objects.create(
                auth_group=member.groups.all()[0])
            m2m_member_group.ts_group.add(ts_member_group)
            m2m_member_group.save()
            m2m_blue_group = AuthTS.objects.create(
                auth_group=blue.groups.all()[0])
            m2m_blue_group.ts_group.add(ts_blue_group)
            m2m_blue_group.save()
            self.service = Teamspeak3Service
            add_permissions()
Пример #2
0
 def setUp(self):
     self.member = 'member_user'
     member = AuthUtils.create_member(self.member)
     DiscordUser.objects.create(user=member, uid='12345')
     self.blue = 'blue_user'
     blue = AuthUtils.create_blue(self.blue)
     DiscordUser.objects.create(user=blue, uid='67891')
     self.none_user = '******'
     none_user = AuthUtils.create_user(self.none_user)
     self.service = DiscordService
Пример #3
0
 def setUp(self):
     self.member = 'member_user'
     member = AuthUtils.create_member(self.member)
     Ips4User.objects.create(user=member, id='12345', username=self.member)
     self.blue = 'blue_user'
     blue = AuthUtils.create_blue(self.blue)
     Ips4User.objects.create(user=blue, id='67891', username=self.blue)
     self.none_user = '******'
     none_user = AuthUtils.create_user(self.none_user)
     self.service = Ips4Service
Пример #4
0
 def setUp(self):
     self.member = 'member_user'
     member = AuthUtils.create_member(self.member)
     DiscourseUser.objects.create(user=member, enabled=True)
     self.blue = 'blue_user'
     blue = AuthUtils.create_blue(self.blue)
     DiscourseUser.objects.create(user=blue, enabled=True)
     self.none_user = '******'
     none_user = AuthUtils.create_user(self.none_user)
     self.service = DiscourseService
Пример #5
0
 def setUp(self):
     self.member = 'member_user'
     member = AuthUtils.create_member(self.member)
     OpenfireUser.objects.create(user=member, username=self.member)
     self.blue = 'blue_user'
     blue = AuthUtils.create_blue(self.blue)
     OpenfireUser.objects.create(user=blue, username=self.blue)
     self.none_user = '******'
     none_user = AuthUtils.create_user(self.none_user)
     self.service = OpenfireService
Пример #6
0
 def setUp(self):
     self.member = 'member_user'
     member = AuthUtils.create_member(self.member)
     MarketUser.objects.create(user=member, username=self.member)
     self.blue = 'blue_user'
     blue = AuthUtils.create_blue(self.blue)
     MarketUser.objects.create(user=blue, username=self.blue)
     self.none_user = '******'
     none_user = AuthUtils.create_user(self.none_user)
     self.service = MarketService
     add_permissions()
Пример #7
0
 def setUp(self):
     self.member = 'member_user'
     member = AuthUtils.create_member(self.member)
     MumbleUser.objects.create(user=member, username=self.member, pwhash='password', groups='Member')
     self.blue = 'blue_user'
     blue = AuthUtils.create_blue(self.blue)
     MumbleUser.objects.create(user=blue, username=self.blue, pwhash='password', groups='Blue')
     self.none_user = '******'
     none_user = AuthUtils.create_user(self.none_user)
     self.service = MumbleService
     add_permissions()
Пример #8
0
 def setUp(self):
     self.member = 'member_user'
     member = AuthUtils.create_member(self.member)
     Ips4User.objects.create(user=member, id='12345', username=self.member)
     self.blue = 'blue_user'
     blue = AuthUtils.create_blue(self.blue)
     Ips4User.objects.create(user=blue, id='67891', username=self.blue)
     self.none_user = '******'
     none_user = AuthUtils.create_user(self.none_user)
     self.service = Ips4Service
     add_permissions()
Пример #9
0
 def setUp(self):
     self.member = 'member_user'
     member = AuthUtils.create_member(self.member)
     SeatUser.objects.create(user=member, username=self.member)
     self.blue = 'blue_user'
     blue = AuthUtils.create_blue(self.blue)
     SeatUser.objects.create(user=blue, username=self.blue)
     self.none_user = '******'
     none_user = AuthUtils.create_user(self.none_user, disconnect_signals=True)
     self.service = SeatService
     add_permissions()
Пример #10
0
 def setUp(self):
     self.member = 'member_user'
     member = AuthUtils.create_member(self.member)
     DiscordUser.objects.create(user=member, uid='12345')
     self.blue = 'blue_user'
     blue = AuthUtils.create_blue(self.blue)
     DiscordUser.objects.create(user=blue, uid='67891')
     self.none_user = '******'
     none_user = AuthUtils.create_user(self.none_user)
     self.service = DiscordService
     add_permissions()
Пример #11
0
 def setUp(self):
     self.member = 'member_user'
     member = AuthUtils.create_member(self.member)
     DiscourseUser.objects.create(user=member, enabled=True)
     self.blue = 'blue_user'
     blue = AuthUtils.create_blue(self.blue)
     DiscourseUser.objects.create(user=blue, enabled=True)
     self.none_user = '******'
     none_user = AuthUtils.create_user(self.none_user)
     self.service = DiscourseService
     add_permissions()
Пример #12
0
 def setUp(self):
     self.member = 'member_user'
     member = AuthUtils.create_member(self.member)
     SeatUser.objects.create(user=member, username=self.member)
     self.blue = 'blue_user'
     blue = AuthUtils.create_blue(self.blue)
     SeatUser.objects.create(user=blue, username=self.blue)
     self.none_user = '******'
     none_user = AuthUtils.create_user(self.none_user,
                                       disconnect_signals=True)
     self.service = SeatService
     add_permissions()
Пример #13
0
    def setUp(self):
        # Inert signals before setup begins
        with mock.patch(MODULE_PATH + '.signals.trigger_all_ts_update') as trigger_all_ts_update:
            self.member = 'member_user'
            member = AuthUtils.create_member(self.member)
            Teamspeak3User.objects.create(user=member, uid=self.member, perm_key='123ABC')
            self.blue = 'blue_user'
            blue = AuthUtils.create_blue(self.blue)
            Teamspeak3User.objects.create(user=blue, uid=self.blue, perm_key='456DEF')
            self.none_user = '******'
            none_user = AuthUtils.create_user(self.none_user)

            ts_member_group = TSgroup.objects.create(ts_group_id=1, ts_group_name='Member')
            ts_blue_group = TSgroup.objects.create(ts_group_id=2, ts_group_name='Blue')
            m2m_member_group = AuthTS.objects.create(auth_group=member.groups.all()[0])
            m2m_member_group.ts_group.add(ts_member_group)
            m2m_member_group.save()
            m2m_blue_group = AuthTS.objects.create(auth_group=blue.groups.all()[0])
            m2m_blue_group.ts_group.add(ts_blue_group)
            m2m_blue_group.save()
            self.service = Teamspeak3Service
            add_permissions()
Пример #14
0
    def setUp(self):
        # Inert signals before setup begins
        with mock.patch(MODULE_PATH + '.signals.trigger_all_ts_update') as trigger_all_ts_update:
            self.member = AuthUtils.create_member('auth_member')
            self.member.set_password('password')
            self.member.email = '*****@*****.**'
            self.member.save()
            AuthUtils.add_main_character(self.member, 'auth_member', '12345', corp_id='111', corp_name='Test Corporation')
            self.blue_user = AuthUtils.create_blue('auth_blue')
            self.blue_user.set_password('password')
            self.blue_user.email = '*****@*****.**'
            self.blue_user.save()
            AuthUtils.add_main_character(self.blue_user, 'auth_blue', '92345', corp_id='111', corp_name='Test Corporation')

            ts_member_group = TSgroup.objects.create(ts_group_id=1, ts_group_name='Member')
            ts_blue_group = TSgroup.objects.create(ts_group_id=2, ts_group_name='Blue')
            m2m_member = AuthTS.objects.create(auth_group=Group.objects.get(name='Member'))
            m2m_member.ts_group.add(ts_member_group)
            m2m_member.save()
            m2m_blue = AuthTS.objects.create(auth_group=Group.objects.get(name='Blue'))
            m2m_blue.ts_group.add(ts_blue_group)
            m2m_blue.save()
Пример #15
0
    def setUp(self):
        # Inert signals before setup begins
        with mock.patch(MODULE_PATH + '.signals.trigger_all_ts_update') as trigger_all_ts_update:
            self.member = AuthUtils.create_member('auth_member')
            self.member.set_password('password')
            self.member.email = '*****@*****.**'
            self.member.save()
            AuthUtils.add_main_character(self.member, 'auth_member', '12345', corp_id='111', corp_name='Test Corporation')
            self.blue_user = AuthUtils.create_blue('auth_blue')
            self.blue_user.set_password('password')
            self.blue_user.email = '*****@*****.**'
            self.blue_user.save()
            AuthUtils.add_main_character(self.blue_user, 'auth_blue', '92345', corp_id='111', corp_name='Test Corporation')

            ts_member_group = TSgroup.objects.create(ts_group_id=1, ts_group_name='Member')
            ts_blue_group = TSgroup.objects.create(ts_group_id=2, ts_group_name='Blue')
            m2m_member = AuthTS.objects.create(auth_group=Group.objects.get(name='Member'))
            m2m_member.ts_group.add(ts_member_group)
            m2m_member.save()
            m2m_blue = AuthTS.objects.create(auth_group=Group.objects.get(name='Blue'))
            m2m_blue.ts_group.add(ts_blue_group)
            m2m_blue.save()
            add_permissions()