def testGetPhoneEntries(self):
    number1 = self.mobile_worker1.get_or_create_phone_entry('999123')
    number2 = self.mobile_worker1.get_or_create_phone_entry('999124')
    self.mobile_worker1.get_or_create_phone_entry('999125')
    number4 = self.mobile_worker2.get_or_create_phone_entry('999126')
    number1.set_two_way()
    number2.set_pending_verification()
    number4.set_two_way()
    self.assertEqual(PhoneNumber.by_domain(self.domain).count(), 4)
    entries = self.mobile_worker1.get_phone_entries()
    self.assertEqual(set(entries.keys()), set(['999123', '999124', '999125']))
    entries = self.mobile_worker1.get_two_way_numbers()
    self.assertEqual(set(entries.keys()), set(['999123']))
def testGetPhoneEntries(self):
    number1 = self.mobile_worker1.get_or_create_phone_entry('999123')
    number2 = self.mobile_worker1.get_or_create_phone_entry('999124')
    self.mobile_worker1.get_or_create_phone_entry('999125')
    number4 = self.mobile_worker2.get_or_create_phone_entry('999126')
    number1.set_two_way()
    number2.set_pending_verification()
    number4.set_two_way()
    self.assertEqual(PhoneNumber.by_domain(self.domain).count(), 4)
    entries = self.mobile_worker1.get_phone_entries()
    self.assertEqual(set(entries.keys()), set(['999123', '999124', '999125']))
    entries = self.mobile_worker1.get_two_way_numbers()
    self.assertEqual(set(entries.keys()), set(['999123']))