

def test_log_call(self):
    if (self.__class__ == LogCallTestCase):
        return
    self.assertEqual(Call.by_domain(self.domain).count(), 0)
    response = self.simulate_inbound_call(self.phone_number)
    self.check_response(response)
    self.assertEqual(Call.by_domain(self.domain).count(), 1)
    call = Call.by_domain(self.domain)[0]
    self.assertEqual(call.couch_recipient_doc_type, 'CommCareCase')
    self.assertEqual(call.couch_recipient, self.case.get_id)
    self.assertEqual(call.direction, INCOMING)

dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/ivr/tests/util.py LogCallTestCase.test_log_call/original