---
title: "Discussion on \"3 Ways to Unit Test REST APIs in Python\" | Hashnode"
description: "Discussion on \"3 Ways to Unit Test REST APIs in Python\". Learn how to unit test REST APIs in Python with Pytest by example. Understand how to mock REST APIs calls and what are the alternatives."
url: "https://hashnode.com/posts/3-ways-to-test-api-client-applications-in-python/5f65d86335d6463d2b5f80b4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [3 Ways to Unit Test REST APIs in Python](https://miguendes.me/3-ways-to-test-api-client-applications-in-python?utm_source=hashnode&utm_medium=feed)

Learn how to unit test REST APIs in Python with Pytest by example. Understand how to mock REST APIs calls and what are the alternatives.

Sep 19, 2020 · 12 min read · miguendes.me  
Updated Jul 23, 2022  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#testing](https://hashnode.com/tag/testing)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#pytest](https://hashnode.com/tag/pytest)
-   [#rest-api](https://hashnode.com/tag/rest-api)

## Written by

[Miguel Brito](https://hashnode.com/@miguendes)

@miguendes · London, UK

  
[View profile](https://hashnode.com/@miguendes)

Machine Learning Software Engineer - Hobbyst Technical Writer - Interested in Software Testing, Best Practices, Scalability, and Python.

AI Software Engineer based in London, UK with 6+ years of professional experience developing and releasing software in different programming languages - Hobbyist Technical Writer - Interested in Software Testing, Best Practices, Scalability, Machine Learning/AI, and Python.

## Responses 1

Markdown supported · ⌘↵ to post

[Paula Maranhão](https://hashnode.com/@pmaranhaor)

[Sep 20, 2020](https://hashnode.com/posts/3-ways-to-test-api-client-applications-in-python/5f65d86335d6463d2b5f80b4/comment/5f671f7635d6463d2b5f8b3a)

Awesome, mate!

[Miguel Brito](https://hashnode.com/@miguendes)

[Sep 21, 2020](https://hashnode.com/posts/3-ways-to-test-api-client-applications-in-python/5f65d86335d6463d2b5f80b4/comment/5f671f7635d6463d2b5f8b3a#reply-5f689e6435d6463d2b5f987f)

Thanks! It means a lot to me.
