From 7ce2acccd146c9f4b4bf30cc2f702b87acb55e97 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Mon, 2 Dec 2024 11:19:29 +0100 Subject: [PATCH] fix test --- tests/test_api.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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(