How To Install django-testproject on Ubuntu 18.04

In this tutorial we learn how to install django-testproject on Ubuntu 18.04. django-testproject is Django test project support (Python 2 version)

Introduction

In this tutorial we learn how to install django-testproject on Ubuntu 18.04.

What is django-testproject

django-testproject is:

This package provides django test project support to make it easier to run application unit tests without testing other parts of django core.

Projects can use run_tests to specify which parts of the codebase listed in INSTALLED_APPLICATIONS will run unit tests.

There are three methods to install django-testproject on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install django-testproject Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install django-testproject using apt-get by running the following command:

sudo apt-get -y install django-testproject

Install django-testproject Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install django-testproject using apt by running the following command:

sudo apt -y install django-testproject

Install django-testproject 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 Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install django-testproject using aptitude by running the following command:

sudo aptitude -y install django-testproject

How To Uninstall django-testproject on Ubuntu 18.04

To uninstall only the django-testproject package we can use the following command:

sudo apt-get remove django-testproject

Uninstall django-testproject And Its Dependencies

To uninstall django-testproject and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove django-testproject

Remove django-testproject Configurations and Data

To remove django-testproject configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge django-testproject

Remove django-testproject configuration, data, and all of its dependencies

We can use the following command to remove django-testproject configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge django-testproject

References

Summary

In this tutorial we learn how to install django-testproject package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.