[PR #886] [MERGED] update category tests to fix 1 failing and 1 error test results #1057

Closed
opened 2026-02-28 00:03:26 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/886
Author: @seanypark505
Created: 11/13/2022
Status: Merged
Merged: 11/13/2022
Merged by: @stephanebruckert

Base: masterHead: fix-categories-tests


📝 Commits (2)

  • 68ec18c update category tests to fix 1 failing and 1 error test results
  • e695b5c update changelog

📊 Changes

2 files changed (+203 additions, -160 deletions)

View changed files

📝 CHANGELOG.md (+198 -156)
📝 tests/integration/user_endpoints/test.py (+5 -4)

📄 Description

Changes/Fixes were made to following tests

test_category:
Inputting 'rock' as the category_id was throwing an error. Changed the input value to the actual category_id of the Rock category.

test_categories_limit_low:
Test was failing with 7 != 1. response['categories'] will always equal 7 since the categories response object has 7 properties. Updated assertion test to compare the length of the items array in the categories object which should equal to the limit value.

test_categories_limit_high:
Test was producing a false-positive passing test. Updated assertion test to compare the length of the items array in the categories object which should equal to the limit value.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/spotipy-dev/spotipy/pull/886 **Author:** [@seanypark505](https://github.com/seanypark505) **Created:** 11/13/2022 **Status:** ✅ Merged **Merged:** 11/13/2022 **Merged by:** [@stephanebruckert](https://github.com/stephanebruckert) **Base:** `master` ← **Head:** `fix-categories-tests` --- ### 📝 Commits (2) - [`68ec18c`](https://github.com/spotipy-dev/spotipy/commit/68ec18c1a0b8099933704a1f1100336db40a44c6) update category tests to fix 1 failing and 1 error test results - [`e695b5c`](https://github.com/spotipy-dev/spotipy/commit/e695b5cfd680098b661d66b33a80952d28179e0d) update changelog ### 📊 Changes **2 files changed** (+203 additions, -160 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+198 -156) 📝 `tests/integration/user_endpoints/test.py` (+5 -4) </details> ### 📄 Description Changes/Fixes were made to following tests **test_category:** Inputting 'rock' as the category_id was throwing an error. Changed the input value to the actual category_id of the Rock category. **test_categories_limit_low:** Test was failing with 7 != 1. `response['categories']` will always equal 7 since the categories response object has 7 properties. Updated assertion test to compare the length of the `items` array in the categories object which should equal to the limit value. **test_categories_limit_high:** Test was producing a false-positive passing test. Updated assertion test to compare the length of the `items` array in the categories object which should equal to the limit value. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:03:26 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#1057
No description provided.