Creating a database for testing

Now we will create the PostgreSQL database that we will use as a repository for our testing environment. Notice that the testing computer or server must have PostgreSQL 10.5 installed on it, as explained in the previous chapters for the development environment. I assume that you are running the tests on the same computer in which you worked with the previous examples.

Remember to make sure that the PostgreSQL bin folder is included in the PATH environmental variable. You should be able to execute the psql command-line utility from your current Terminal, Command Prompt, or Windows PowerShell.

We will use the PostgreSQL command-line tools to create a new database named test_flask_notifications. If you already ...

Get Hands-On RESTful Python Web Services - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.