refreshDatabase Run the python manage.py flush command. Syntax cy.refreshDatabase(); Usage cy.refreshDatabase();