forked from UnBTV/UnB-TV-VideoService
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conserta o problema na remove_favorite
- Loading branch information
1 parent
650d666
commit 1851789
Showing
3 changed files
with
31 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="9" time="2.868" timestamp="2024-08-03T15:16:40.666896" hostname="dc999a51f205"><testcase classname="test_favorite" name="test_add_to_favorite" time="0.045" /><testcase classname="test_favorite" name="test_check_favorite" time="0.007" /><testcase classname="test_schedule.TestSchedule" name="test_schedule_get_schedule_day" time="1.197" /><testcase classname="test_schedule.TestSchedule" name="test_schedule_get_schedule_specific_day_invalid" time="0.003" /><testcase classname="test_schedule.TestSchedule" name="test_schedule_get_schedule_specific_day" time="0.582" /><testcase classname="test_schedule.TestSchedule" name="test_schedule_get_schedule_day_exception_handling" time="0.004" /><testcase classname="test_watch_later" name="test_add_to_watch_later" time="0.008" /><testcase classname="test_watch_later" name="test_check_watch_later_status" time="0.007" /><testcase classname="test_watch_later" name="test_remove_from_watch_later" time="0.013" /></testsuite></testsuites> | ||
<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="1" skipped="0" tests="10" time="4.950" timestamp="2024-08-04T21:45:23.909118" hostname="5a0db4a21511"><testcase classname="test_favorite" name="test_add_to_favorite" time="0.111" /><testcase classname="test_favorite" name="test_check_favorite" time="0.017" /><testcase classname="test_favorite" name="test_remove_from_favorites" time="0.033"><failure message="assert True is False">setup_database = None | ||
|
||
def test_remove_from_favorites(setup_database): | ||
response = client.delete("/api/favorite/video123?user_id=user123") | ||
print("Response from DELETE:", response.json()) | ||
assert response.status_code == 200 | ||
assert response.json()["message"] == "Removed from favorites" | ||
|
||
|
||
# Check status again to ensure it's removed | ||
response = client.get("/api/favorite/status/video123?user_id=user123") | ||
print("Response from GET status:", response.json()) | ||
assert response.status_code == 200 | ||
> assert response.json()["statusfavorite"] is False | ||
E assert True is False | ||
|
||
test_favorite.py:66: AssertionError</failure></testcase><testcase classname="test_schedule.TestSchedule" name="test_schedule_get_schedule_day" time="0.846" /><testcase classname="test_schedule.TestSchedule" name="test_schedule_get_schedule_specific_day_invalid" time="0.007" /><testcase classname="test_schedule.TestSchedule" name="test_schedule_get_schedule_specific_day" time="0.896" /><testcase classname="test_schedule.TestSchedule" name="test_schedule_get_schedule_day_exception_handling" time="0.011" /><testcase classname="test_watch_later" name="test_add_to_watch_later" time="0.021" /><testcase classname="test_watch_later" name="test_check_watch_later_status" time="0.017" /><testcase classname="test_watch_later" name="test_remove_from_watch_later" time="0.033" /></testsuite></testsuites> |
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