forked from AdaGold/viewing-party
-
Notifications
You must be signed in to change notification settings - Fork 28
Sphinx-Denise-Ajar-Lorraine #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shiyinxi
wants to merge
28
commits into
Ada-C22:main
Choose a base branch
from
dpchengmath:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
7ba7fd2
first wave 1 completed with tests passing (still need to work on exce…
dpchengmath 246fd1c
wave 2 updates
dpchengmath fc6d416
wave_01 tests completed
57563d8
updates...
dpchengmath 926bc60
clean-up
dpchengmath abbeea3
variable name changes
dpchengmath af9e4bc
completed waves 1-3 but wave 3 tests still need updates and bug fixes
dpchengmath 9adbfd5
test git
3a01d0b
merge the solution to wave 4
f292115
merging changes to wave 4
eae9433
debug wave 03 completed with all tests passed
1a29187
merge conflict
df24496
mergy conflict 02
53b6dd1
completed wave 5 and tests
c647610
clean version with all five waves and tests completed
dpchengmath 686668a
refactored version of viewing party with final edits completed.
dpchengmath 8327ae5
review and clean up
d06e1d8
clean version
dpchengmath a189a7a
Merge branch 'main' of https://github.com/dpchengmath/viewing-party
dpchengmath 8673bfd
update wave5 get_new_rec_by_genre function
4c9d0a5
comment out some unneccessary lines
5fabc62
dry edits
dpchengmath f7c20f2
Merge branch 'main' of https://github.com/dpchengmath/viewing-party
dpchengmath a172076
viewing party D.R.Y.
dpchengmath 5f06977
Lines under 80 characters
dpchengmath 0071385
Updated viewing party
dpchengmath 50f08fe
Refactoring viewing party.
dpchengmath cd1f239
Cleaning up viewing party file
dpchengmath File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ | |
| from viewing_party.party import * | ||
| from tests.test_constants import * | ||
|
|
||
| @pytest.mark.skip() | ||
| # @pytest.mark.skip() | ||
| def test_create_successful_movie(): | ||
| # Arrange | ||
| movie_title = MOVIE_TITLE_1 | ||
|
|
@@ -19,7 +19,7 @@ def test_create_successful_movie(): | |
| assert new_movie["genre"] == GENRE_1 | ||
| assert new_movie["rating"] == pytest.approx(RATING_1) | ||
|
|
||
| @pytest.mark.skip() | ||
| # @pytest.mark.skip() | ||
| def test_create_no_title_movie(): | ||
| # Arrange | ||
| movie_title = None | ||
|
|
@@ -32,7 +32,7 @@ def test_create_no_title_movie(): | |
| # Assert | ||
| assert new_movie is None | ||
|
|
||
| @pytest.mark.skip() | ||
| # @pytest.mark.skip() | ||
| def test_create_no_genre_movie(): | ||
| # Arrange | ||
| movie_title = "Title A" | ||
|
|
@@ -45,7 +45,7 @@ def test_create_no_genre_movie(): | |
| # Assert | ||
| assert new_movie is None | ||
|
|
||
| @pytest.mark.skip() | ||
| # @pytest.mark.skip() | ||
| def test_create_no_rating_movie(): | ||
| # Arrange | ||
| movie_title = "Title A" | ||
|
|
@@ -58,7 +58,7 @@ def test_create_no_rating_movie(): | |
| # Assert | ||
| assert new_movie is None | ||
|
|
||
| @pytest.mark.skip() | ||
| # @pytest.mark.skip() | ||
| def test_adds_movie_to_user_watched(): | ||
| # Arrange | ||
| movie = { | ||
|
|
@@ -79,7 +79,7 @@ def test_adds_movie_to_user_watched(): | |
| assert updated_data["watched"][0]["genre"] == GENRE_1 | ||
| assert updated_data["watched"][0]["rating"] == RATING_1 | ||
|
|
||
| @pytest.mark.skip() | ||
| # @pytest.mark.skip() | ||
| def test_adds_movie_to_non_empty_user_watched(): | ||
| # Arrange | ||
| movie = { | ||
|
|
@@ -99,7 +99,7 @@ def test_adds_movie_to_non_empty_user_watched(): | |
| assert movie in updated_data["watched"] | ||
| assert FANTASY_2 in updated_data["watched"] | ||
|
|
||
| @pytest.mark.skip() | ||
| # @pytest.mark.skip() | ||
| def test_adds_movie_to_user_watchlist(): | ||
| # Arrange | ||
| movie = { | ||
|
|
@@ -120,7 +120,7 @@ def test_adds_movie_to_user_watchlist(): | |
| assert updated_data["watchlist"][0]["genre"] == GENRE_1 | ||
| assert updated_data["watchlist"][0]["rating"] == RATING_1 | ||
|
|
||
| @pytest.mark.skip() | ||
| # @pytest.mark.skip() | ||
| def test_adds_movie_to_non_empty_user_watchlist(): | ||
| # Arrange | ||
| movie = { | ||
|
|
@@ -140,7 +140,7 @@ def test_adds_movie_to_non_empty_user_watchlist(): | |
| assert movie in updated_data["watchlist"] | ||
| assert FANTASY_2 in updated_data["watchlist"] | ||
|
|
||
| @pytest.mark.skip() | ||
| # @pytest.mark.skip() | ||
| def test_moves_movie_from_watchlist_to_empty_watched(): | ||
| # Arrange | ||
| janes_data = { | ||
|
|
@@ -158,13 +158,22 @@ def test_moves_movie_from_watchlist_to_empty_watched(): | |
| # Assert | ||
| assert len(updated_data["watchlist"]) == 0 | ||
| assert len(updated_data["watched"]) == 1 | ||
|
|
||
| assert updated_data == { | ||
| "watchlist": [], | ||
| "watched": [{ | ||
| "title": MOVIE_TITLE_1, | ||
| "genre": GENRE_1, | ||
| "rating": RATING_1 | ||
| }] | ||
| } | ||
|
|
||
| raise Exception("Test needs to be completed.") | ||
| # raise Exception("Test needs to be completed.") | ||
| # ******************************************************************************************* | ||
| # ****** Add assertions here to test that the correct movie was added to "watched" ********** | ||
| # ******************************************************************************************* | ||
|
|
||
| @pytest.mark.skip() | ||
| # @pytest.mark.skip() | ||
| def test_moves_movie_from_watchlist_to_watched(): | ||
| # Arrange | ||
| movie_to_watch = HORROR_1 | ||
|
|
@@ -183,12 +192,18 @@ def test_moves_movie_from_watchlist_to_watched(): | |
| assert len(updated_data["watchlist"]) == 1 | ||
| assert len(updated_data["watched"]) == 2 | ||
|
|
||
| raise Exception("Test needs to be completed.") | ||
| assert updated_data == { | ||
| "watchlist": [ | ||
| FANTASY_1 | ||
| ], | ||
| "watched": [FANTASY_2, HORROR_1] | ||
| } | ||
|
Comment on lines
+195
to
+200
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍🏿 |
||
| # raise Exception("Test needs to be completed.") | ||
| # ******************************************************************************************* | ||
| # ****** Add assertions here to test that the correct movie was added to "watched" ********** | ||
| # ******************************************************************************************* | ||
|
|
||
| @pytest.mark.skip() | ||
| # @pytest.mark.skip() | ||
| def test_does_nothing_if_movie_not_in_watchlist(): | ||
| # Arrange | ||
| movie_to_watch = HORROR_1 | ||
|
|
@@ -205,3 +220,6 @@ def test_does_nothing_if_movie_not_in_watchlist(): | |
| assert len(updated_data["watched"]) == 1 | ||
| assert movie_to_watch not in updated_data["watchlist"] | ||
| assert movie_to_watch not in updated_data["watched"] | ||
|
|
||
|
|
||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| from viewing_party.party import * | ||
| from tests.test_constants import * | ||
|
|
||
| @pytest.mark.skip() | ||
| # @pytest.mark.skip() | ||
| def test_new_genre_rec(): | ||
| # Arrange | ||
| sonyas_data = clean_wave_5_data() | ||
|
|
@@ -17,7 +17,7 @@ def test_new_genre_rec(): | |
| assert FANTASY_4b in recommendations | ||
| assert sonyas_data == clean_wave_5_data() | ||
|
|
||
| @pytest.mark.skip() | ||
| # @pytest.mark.skip() | ||
| def test_new_genre_rec_from_empty_watched(): | ||
| # Arrange | ||
| sonyas_data = { | ||
|
|
@@ -38,7 +38,7 @@ def test_new_genre_rec_from_empty_watched(): | |
| # Assert | ||
| assert len(recommendations) == 0 | ||
|
|
||
| @pytest.mark.skip() | ||
| # @pytest.mark.skip() | ||
| def test_new_genre_rec_from_empty_friends(): | ||
| # Arrange | ||
| sonyas_data = { | ||
|
|
@@ -53,12 +53,12 @@ def test_new_genre_rec_from_empty_friends(): | |
| ] | ||
| } | ||
|
|
||
| raise Exception("Test needs to be completed.") | ||
| # ********************************************************************* | ||
| # ****** Complete the Act and Assert Portions of these tests ********** | ||
| # ********************************************************************* | ||
| # Act | ||
| recommendations = get_new_rec_by_genre(sonyas_data) | ||
|
|
||
| # Assert | ||
| assert recommendations == [] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍🏿 |
||
|
|
||
| @pytest.mark.skip() | ||
| def test_unique_rec_from_favorites(): | ||
| # Arrange | ||
| sonyas_data = clean_wave_5_data() | ||
|
|
@@ -72,7 +72,6 @@ def test_unique_rec_from_favorites(): | |
| assert INTRIGUE_2b in recommendations | ||
| assert sonyas_data == clean_wave_5_data() | ||
|
|
||
| @pytest.mark.skip() | ||
| def test_unique_from_empty_favorites(): | ||
| # Arrange | ||
| sonyas_data = { | ||
|
|
@@ -94,7 +93,7 @@ def test_unique_from_empty_favorites(): | |
| # Assert | ||
| assert len(recommendations) == 0 | ||
|
|
||
| @pytest.mark.skip() | ||
| # @pytest.mark.skip() | ||
| def test_new_rec_from_empty_friends(): | ||
| # Arrange | ||
| sonyas_data = { | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨