def testCanSeeRegOnSecondRegistrant(self): resA = initA.register() self.assertEqual(resA, 0) res = initB.register() self.assertEqual(res, 0) registrantsB = initB.getRegistrants() self.assertEqual(len(registrantsB), 2) self.assertIn(initA.key, registrantsB) self.assertIn(initB.key, registrantsB)
def testCanUnregister(self): res = initA.unregister() self.assertEqual(res, 0) registrants = initA.getRegistrants() self.assertEqual(len(registrants), 1) res = initB.unregister() self.assertEqual(res, 0) registrants = initB.getRegistrants() self.assertEqual(len(registrants), 0)