def testDelete(self):
    self.mobile_worker1.get_or_create_phone_entry('999123')
    self.mobile_worker1.get_or_create_phone_entry('999124')
    self.mobile_worker1.get_or_create_phone_entry('999125')
    self.mobile_worker2.get_or_create_phone_entry('999126')
    self.assertEqual(PhoneNumber.by_domain(self.domain).count(), 4)
    self.mobile_worker1.delete_phone_entry('999124')
    self.assertEqual(PhoneNumber.by_domain(self.domain).count(), 3)
    entries = self.mobile_worker1.get_phone_entries()
    self.assertEqual(set(entries.keys()), set(['999123', '999125']))
    entries = self.mobile_worker2.get_phone_entries()
    self.assertEqual(set(entries.keys()), set(['999126']))
def testDelete(self):
    self.mobile_worker1.get_or_create_phone_entry('999123')
    self.mobile_worker1.get_or_create_phone_entry('999124')
    self.mobile_worker1.get_or_create_phone_entry('999125')
    self.mobile_worker2.get_or_create_phone_entry('999126')
    self.assertEqual(PhoneNumber.by_domain(self.domain).count(), 4)
    self.mobile_worker1.delete_phone_entry('999124')
    self.assertEqual(PhoneNumber.by_domain(self.domain).count(), 3)
    entries = self.mobile_worker1.get_phone_entries()
    self.assertEqual(set(entries.keys()), set(['999123', '999125']))
    entries = self.mobile_worker2.get_phone_entries()
    self.assertEqual(set(entries.keys()), set(['999126']))