summaryrefslogtreecommitdiffstats
path: root/openbb_platform/core/tests/app/model/abstract/test_warning.py
diff options
context:
space:
mode:
Diffstat (limited to 'openbb_platform/core/tests/app/model/abstract/test_warning.py')
-rw-r--r--openbb_platform/core/tests/app/model/abstract/test_warning.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/openbb_platform/core/tests/app/model/abstract/test_warning.py b/openbb_platform/core/tests/app/model/abstract/test_warning.py
index 5c466442f12..3a506e6d658 100644
--- a/openbb_platform/core/tests/app/model/abstract/test_warning.py
+++ b/openbb_platform/core/tests/app/model/abstract/test_warning.py
@@ -1,3 +1,5 @@
+"""Test the Warnings model."""
+
from unittest.mock import Mock
import pytest
@@ -12,6 +14,7 @@ from openbb_core.app.model.abstract.warning import Warning_, cast_warning
],
)
def test_warn_model(category, message):
+ """Test the Warning_ model."""
war = Warning_(category=category, message=message)
assert war.category == category
@@ -19,7 +22,8 @@ def test_warn_model(category, message):
def test_fields():
- fields = Warning_.__fields__
+ """Test the Warning_ fields."""
+ fields = Warning_.model_fields
fields_keys = fields.keys()
assert "category" in fields_keys
@@ -27,6 +31,7 @@ def test_fields():
def test_cast_warning():
+ """Test the cast_warning function."""
mock_warning_message = Mock()
mock_warning_message.category.__name__ = "test"
mock_warning_message.message = "test"