def testRetire(self):
    self.mobile_worker1.phone_numbers = ['9990001']
    self.mobile_worker1.save()
    self.assertEqual(PhoneNumber.by_domain(self.domain).count(), 1)
    self.assertPhoneEntries(self.mobile_worker1, ['9990001'])
    self.mobile_worker2.phone_numbers = ['9990002']
    self.mobile_worker2.save()
    self.assertEqual(PhoneNumber.by_domain(self.domain).count(), 2)
    self.assertPhoneEntries(self.mobile_worker2, ['9990002'])
    self.mobile_worker1.retire(deleted_by=None)
    self.assertEqual(PhoneNumber.by_domain(self.domain).count(), 1)
    self.assertPhoneEntries(self.mobile_worker2, ['9990002'])
def testRetire(self):
    self.mobile_worker1.phone_numbers = ['9990001']
    self.mobile_worker1.save()
    self.assertEqual(PhoneNumber.by_domain(self.domain).count(), 1)
    self.assertPhoneEntries(self.mobile_worker1, ['9990001'])
    self.mobile_worker2.phone_numbers = ['9990002']
    self.mobile_worker2.save()
    self.assertEqual(PhoneNumber.by_domain(self.domain).count(), 2)
    self.assertPhoneEntries(self.mobile_worker2, ['9990002'])
    self.mobile_worker1.retire(deleted_by=None)
    self.assertEqual(PhoneNumber.by_domain(self.domain).count(), 1)
    self.assertPhoneEntries(self.mobile_worker2, ['9990002'])