# Testing an Interactive Voice Response System With Python and Pytest

DevFeed: [Testing an Interactive Voice Response System With Python and Pytest](<https://devfeed.tech/articles/testing-an-interactive-voice-response-system-with-python-and-pytest-33930.md>)

Original publisher: [Read original article](<https://hakibenita.com/python-django-pytest-twilio-ivr>)

Author: Haki Benita

Published: 2020-04-30T21:00:00Z

Content type: tutorial

Language: en

Sources: [Haki Benita](<https://devfeed.tech/sources/haki-benita.md>)

Topics: [Pytest](<https://devfeed.tech/topics/pytest.md>), [Python](<https://devfeed.tech/topics/python.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>), [business logic](<https://devfeed.tech/topics/business-logic.md>), [Django](<https://devfeed.tech/topics/django.md>)

Tags: [articles](<https://devfeed.tech/tags/articles.md>), [automated](<https://devfeed.tech/tags/automated.md>), [business-logic](<https://devfeed.tech/tags/business-logic.md>), [django](<https://devfeed.tech/tags/django.md>), [patterns](<https://devfeed.tech/tags/patterns.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [python](<https://devfeed.tech/tags/python.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

## AI overview

This tutorial explains how to write automated tests for a Twilio Interactive Voice Response system built with Python and Django. It focuses on isolating business logic from the third-party service so the logic can be tested separately, using Pytest fixtures and other testing patterns.

## Source excerpt

It can be very challenging to test a system that rely heavily on a third party service such as Twilio. In this article, I show how to organize your code in a way that would isolate your bushiness logic and make it easier for you to test it separately.