@run_with_all_backends
def test_multiple_entries(self):
    extra_number = PhoneNumber.objects.create(domain=self.domain, owner_doc_type='X', owner_id='X', phone_number='999124', verified=False, pending_verification=False, is_two_way=False)
    with create_test_case(self.domain, 'participant', 'test1', drop_signals=False) as case:
        case = self.set_case_property(case, 'contact_phone_number', '999124')
        case = self.set_case_property(case, 'contact_phone_number_is_verified', '1')
        case.create_phone_entry('999125')
        self.assertEqual(PhoneNumber.objects.count(), 3)
        sync_case_phone_number(case)
        self.assertEqual(PhoneNumber.objects.count(), 2)
        number1 = PhoneNumber.objects.get(pk=extra_number.pk)
        self.assertEqual(number1.owner_id, 'X')
        number2 = PhoneNumber.objects.get(owner_id=case.case_id)
        self.assertTrue(number2.verified)
        self.assertTrue(number2.is_two_way)
        self.assertFalse(number2.pending_verification)
@run_with_all_backends
def test_multiple_entries(self):
    extra_number = PhoneNumber.objects.create(domain=self.domain, owner_doc_type='X', owner_id='X', phone_number='999124', verified=False, pending_verification=False, is_two_way=False)
    with create_test_case(self.domain, 'participant', 'test1', drop_signals=False) as case:
        case = self.set_case_property(case, 'contact_phone_number', '999124')
        case = self.set_case_property(case, 'contact_phone_number_is_verified', '1')
        case.create_phone_entry('999125')
        self.assertEqual(PhoneNumber.objects.count(), 3)
        sync_case_phone_number(case)
        self.assertEqual(PhoneNumber.objects.count(), 2)
        number1 = PhoneNumber.objects.get(pk=extra_number.pk)
        self.assertEqual(number1.owner_id, 'X')
        number2 = PhoneNumber.objects.get(owner_id=case.case_id)
        self.assertTrue(number2.verified)
        self.assertTrue(number2.is_two_way)
        self.assertFalse(number2.pending_verification)