This repository has been archived by the owner on Sep 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
put api-error objects behind settings flag, disable signal and api-er…
…ror tests if they are not enabled.
- Loading branch information
Toni
committed
Nov 26, 2021
1 parent
d6f94b9
commit 57a782c
Showing
7 changed files
with
29 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
from .post_delete import * | ||
from .request_finished import * | ||
from django.conf import settings | ||
|
||
if settings.ENABLE_SIGNALS: | ||
from .post_delete import * | ||
from .request_finished import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
# :author: CSC - IT Center for Science Ltd., Espoo Finland <[email protected]> | ||
# :license: MIT | ||
import logging | ||
import unittest | ||
from unittest.mock import patch | ||
from uuid import uuid4 | ||
|
||
|
@@ -14,10 +15,12 @@ | |
|
||
from metax_api.models import ApiError | ||
from metax_api.tests.utils import TestClassUtils, test_data_file_path, testcase_log_console | ||
from django.conf import settings | ||
|
||
_logger = logging.getLogger(__name__) | ||
|
||
|
||
@unittest.skipIf(settings.ENABLE_API_ERROR_OBJECTS is not True, "Only run if API errors are objects") | ||
class ApiErrorReadBasicTests(APITestCase, TestClassUtils): | ||
|
||
""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters