diff --git a/tests/test_api.py b/tests/test_api.py index b96f5bd..99e996c 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -2,6 +2,8 @@ from pathlib import Path from shutil import rmtree +from transifex.api.jsonapi.exceptions import DoesNotExist + from pytransifex.api import Transifex from pytransifex.interfaces import Tx from tests import logging, test_config @@ -32,7 +34,10 @@ def setUpClass(cls): ) logger.info("Deleting test project if it already exists") - cls.tx.delete_project(project_slug=cls.project_slug) + try: + cls.tx.delete_project(project_slug=cls.project_slug) + except DoesNotExist: + pass logger.info("Creating a brand new project") cls.tx.create_project(