Esempio n. 1
0
        def testcase_readergroup_iadd(self):
            """test groups+=[newgroups]"""

            # take a snapshot of current groups
            groupssnapshot = list(readergroups())
            groups = readergroups()

            # add pinpad group
            groups += [self.pinpadgroup]
            self.assertEqual(groups, groupssnapshot + [self.pinpadgroup])

            # add pinpad a second time and biometric once
            groups += [self.biogroup, self.pinpadgroup]
            self.assertEqual(groups, groupssnapshot + [self.pinpadgroup, self.biogroup])

            # clean-up
            groups.remove(self.biogroup)
            groups.remove(self.pinpadgroup)
Esempio n. 2
0
        def testcase_readergroup_iadd(self):
            """test groups+=[newgroups]"""

            # take a snapshot of current groups
            groupssnapshot = list(readergroups())
            groups = readergroups()

            # add pinpad group
            groups += [self.pinpadgroup]
            self.assertEqual(groups, groupssnapshot + [self.pinpadgroup])

            # add pinpad a second time and biometric once
            groups += [self.biogroup, self.pinpadgroup]
            self.assertEqual(
                groups, groupssnapshot + [self.pinpadgroup, self.biogroup])

            # clean-up
            groups.remove(self.biogroup)
            groups.remove(self.pinpadgroup)
Esempio n. 3
0
        def testcase_readergroup_radd(self):
            """test groups=[newgroups]+groups"""

            # take a snapshot of current groups
            groupssnapshot = list(readergroups())
            groups = readergroups()

            # add pinpad group
            zgroups = [self.pinpadgroup] + groups
            self.assertEqual(groups, groupssnapshot)
            self.assertEqual(zgroups, groupssnapshot + [self.pinpadgroup])
            self.assertTrue(isinstance(zgroups, type([])))
            self.assertTrue(isinstance(groups, type(readergroups())))

            # add pinpad a tiwce and biometric once
            zgroups = [self.pinpadgroup, self.biogroup, self.pinpadgroup] + groups
            self.assertEqual(groups, groupssnapshot)
            self.assertEqual(zgroups, groupssnapshot + [self.pinpadgroup, self.biogroup])
            self.assertTrue(isinstance(zgroups, type([])))
            self.assertTrue(isinstance(groups, type(readergroups())))
Esempio n. 4
0
        def testcase_readergroup_radd(self):
            """test groups=[newgroups]+groups"""

            # take a snapshot of current groups
            groupssnapshot = list(readergroups())
            groups = readergroups()

            # add pinpad group
            zgroups = [self.pinpadgroup] + groups
            self.assertEqual(groups, groupssnapshot)
            self.assertEqual(zgroups, groupssnapshot + [self.pinpadgroup])
            self.assertTrue(isinstance(zgroups, type([])))
            self.assertTrue(isinstance(groups, type(readergroups())))

            # add pinpad a tiwce and biometric once
            zgroups = \
                [self.pinpadgroup, self.biogroup, self.pinpadgroup] + groups
            self.assertEqual(groups, groupssnapshot)
            self.assertEqual(
                zgroups, groupssnapshot + [self.pinpadgroup, self.biogroup])
            self.assertTrue(isinstance(zgroups, type([])))
            self.assertTrue(isinstance(groups, type(readergroups())))
Esempio n. 5
0
        def testcase_readergroup_insert(self):
            """test groups.insert(i,newgroups)"""

            # take a snapshot of current groups
            groupssnapshot = list(readergroups())
            groups = readergroups()

            # add pinpad group
            groups.insert(0, self.pinpadgroup)
            self.assertEquals(groups, groupssnapshot + [self.pinpadgroup])

            # add pinpad a second time
            groups.insert(1, self.pinpadgroup)
            self.assertEquals(groups, groupssnapshot + [self.pinpadgroup])

            # add biometric once
            groups.insert(1, self.biogroup)
            self.assertEquals(
                groups, groupssnapshot + [self.pinpadgroup, self.biogroup])

            # clean-up
            groups.remove(self.biogroup)
            groups.remove(self.pinpadgroup)
Esempio n. 6
0
 def testcase_readergroups(self):
     foundreadergroups = {}
     for readergroup in readergroups():
         foundreadergroups[readergroup] = 1
     for readergroup in expectedReaderGroups:
         self.assertTrue(readergroup in foundreadergroups)
Esempio n. 7
0
 def testcase_readergroups(self):
     foundreadergroups = {}
     for readergroup in readergroups():
         foundreadergroups[readergroup] = 1
     for readergroup in expectedReaderGroups:
         self.assert_(readergroup in foundreadergroups)
Esempio n. 8
0
 def testcase_readergroups(self):
     foundreadergroups = {}
     for readergroup in readergroups():
         foundreadergroups[readergroup] = 1
     for readergroup in expectedReaderGroups:
         self.assert_(foundreadergroups.has_key(readergroup))