def test_verify_uniqueness(self):
    number1 = PhoneNumber.objects.create(domain=self.domain, owner_doc_type='X', owner_id='X', phone_number='999123', verified=True, pending_verification=False, is_two_way=True)
    number2 = PhoneNumber.objects.create(domain=self.domain, owner_doc_type='X', owner_id='X', phone_number='999123', verified=False, pending_verification=False, is_two_way=False)
    number1.verify_uniqueness()
    with self.assertRaises(PhoneNumberInUseException):
        number2.verify_uniqueness()
def test_verify_uniqueness(self):
    number1 = PhoneNumber.objects.create(domain=self.domain, owner_doc_type='X', owner_id='X', phone_number='999123', verified=True, pending_verification=False, is_two_way=True)
    number2 = PhoneNumber.objects.create(domain=self.domain, owner_doc_type='X', owner_id='X', phone_number='999123', verified=False, pending_verification=False, is_two_way=False)
    number1.verify_uniqueness()
    with self.assertRaises(PhoneNumberInUseException):
        number2.verify_uniqueness()