def setUp(self): groups = PCSCReaderGroups() try: groups.remove('Pinpad$Readers') groups.remove('Biometric$Readers') except: pass
def testcase_append(self): """Test for groups.append(newgroup)""" groupssnapshot = list(PCSCReaderGroups()) groups = PCSCReaderGroups() newgroup = 'Pinpad$Readers' groups.append(newgroup) self.assertEquals(groups, groupssnapshot + [newgroup]) groups.remove(newgroup)
def testcase_insert(self): """Test for groups.insert(newgroup)""" groupssnapshot = list(PCSCReaderGroups()) groups = PCSCReaderGroups() newgroup = 'Pinpad$Readers' groups.insert(0, newgroup) self.assertEquals(groups, [newgroup] + groupssnapshot) groups.remove(newgroup)
def testcase_iadd(self): """Test for groups+=newgroup""" groupssnapshot = list(PCSCReaderGroups().instance) groups = PCSCReaderGroups().instance newgroup = 'Pinpad$Readers' groups += newgroup self.assertEquals(groups, groupssnapshot + [newgroup]) groups.remove(newgroup)
def testcase_iaddlist(self): """Test for groups+=[newgroups]""" groupssnapshot = list(PCSCReaderGroups()) groups = PCSCReaderGroups() newgroups = ['Pinpad$Readers', 'Biometric$Readers'] groups += newgroups self.assertEquals(groups, groupssnapshot + newgroups) for group in newgroups: groups.remove(group)
def testcase_addlist(self): """Test for groups=groups+[newgroups]""" groupssnapshot = list(PCSCReaderGroups().instance) groups = PCSCReaderGroups().instance newgroups = ['Pinpad$Readers', 'Biometric$Readers'] groups = groups + newgroups self.assertEqual(groups, groupssnapshot + newgroups) for group in newgroups: groups.remove(group)
def setUp(self): groups = PCSCReaderGroups().instance groups.remove('Pinpad$Readers') groups.remove('Biometric$Readers')