How To Install python-requests-mock on Debian 10
Introduction
In this tutorial we learn how to install python-requests-mock
on Debian 10.
What is python-requests-mock
python-requests-mock is:
requests-mock provides a building block to stub out the HTTP requests_ portions of your testing code. Everything in requests_ eventually goes through an adapter to do the transport work. requests-mock creates a custom adapter that allows you to predefine responses when certain URIs are called. There are then a number of methods provided to get the adapter used.
This package contains the Python 2.x module.
There are three methods to install python-requests-mock
on Debian 10. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install python-requests-mock Using apt-get
Update apt database with apt-get
using the following command.
After updating apt database, We can install python-requests-mock
using apt-get
by running the following command:
Install python-requests-mock Using apt
Update apt database with apt
using the following command.
After updating apt database, We can install python-requests-mock
using apt
by running the following command:
Install python-requests-mock Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude
using the following command.
After updating apt database, We can install python-requests-mock
using aptitude
by running the following command:
How To Uninstall python-requests-mock on Debian 10
To uninstall only the python-requests-mock
package we can use the following command:
Uninstall python-requests-mock And Its Dependencies
To uninstall python-requests-mock
and its dependencies that are no longer needed by Debian 10, we can use the command below:
Remove python-requests-mock Configurations and Data
To remove python-requests-mock
configuration and data from Debian 10 we can use the following command:
Remove python-requests-mock configuration, data, and all of its dependencies
We can use the following command to remove python-requests-mock
configurations, data and all of its dependencies, we can use the following command:
Dependencies
python-requests-mock have the following dependencies:
References
Summary
In this tutorial we learn how to install python-requests-mock
package on Debian 10 using different package management tools: apt
, apt-get
and aptitude
.