Skip to content

Commit

Permalink
Fixed an issue that caused pytest to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffshurtliff committed Oct 27, 2022
1 parent e6d1108 commit 5b5bade
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ Fixes in the :doc:`primary modules <primary-modules>`.
to reflect the proper default value of the ``return_json`` parameter and to define the correct
return value.

Supporting Modules
------------------
Fixes in the :doc:`supporting modules <supporting-modules>`.

* Fixed an issue with testing the retrieval of views in the
:py:func:`khoros.utils.tests.test_categories.test_category_details` function to ensure a
successful assertion.

|
-----
Expand Down
5 changes: 4 additions & 1 deletion khoros/utils/tests/test_categories.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def test_if_category_exists():
def test_category_details():
"""This function tests the retrieval of various category details.
.. versionchanged:: 5.1.3
Fixed an issue with testing the retrieval of views to ensure a successful assertion.
.. versionchanged:: 5.1.1
This function has been updated to leverage the functions in the ``resources`` module.
Expand Down Expand Up @@ -135,7 +138,7 @@ def test_category_details():

# Test retrieval of views
views = khoros_object.categories.get_views(control_data.get('id'))
assert isinstance(views, int) and views > 0
assert isinstance(views, int) and views >= 0

# Test retrieval of friendly date enabled setting
friendly_date = khoros_object.categories.friendly_date_enabled(control_data.get('id'))
Expand Down

0 comments on commit 5b5bade

Please sign in to comment.