forked from AdaGold/viewing-party
-
Notifications
You must be signed in to change notification settings - Fork 81
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
Kunzite - Gabby Y. and Allie S. #45
Open
gnyoung
wants to merge
21
commits into
Ada-C19:main
Choose a base branch
from
azs6189: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.
+221
−41
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
830f2e5
creates create_movie() function
azs6189 d4e5de5
passes tests for create_movie() function
azs6189 05fa9f1
creates add_to_watched() function
azs6189 ff87cfc
passes tests for add_to_watched() function
azs6189 54b7222
creates add_to_watchlist() function
azs6189 1a8084a
passes tests for add_to_watchlist() function
azs6189 74a709f
creates watch_movie() function
azs6189 6d9a150
passes tests for watch_movie() function
azs6189 06172af
Create get_watched_avg_rating()
gnyoung 800cfce
Create get_most_watched_genre()
gnyoung 10b0006
Fix indentation in get_watched_avg_rating()
gnyoung b39355e
passes all tests in wave-02
azs6189 35bb3bb
creates get_unique_watched() function
azs6189 002b558
passes tests for get_unique_watched() function
azs6189 19c9558
Create get_friends_unique_watched(), get_available_recs() and get_new…
gnyoung d1a3e92
creates get_rec_from_favorites() function
azs6189 553b62b
passes test_wave_05.py
azs6189 2560ec2
passes all test_wave_03 tests
azs6189 132f015
Refactor functions for better readability
gnyoung 99dfe56
Add assert statement for wave 5
gnyoung 3af3559
Refactor get_most_watched_genre for readability
gnyoung 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 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,8 @@ | |
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 +20,9 @@ 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 +35,9 @@ 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 +50,9 @@ 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 +65,8 @@ 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 +87,8 @@ 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 +108,8 @@ 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 +130,8 @@ 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 +151,8 @@ 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 +170,20 @@ def test_moves_movie_from_watchlist_to_empty_watched(): | |
# Assert | ||
assert len(updated_data["watchlist"]) == 0 | ||
assert len(updated_data["watched"]) == 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" ********** | ||
# ******************************************************************************************* | ||
assert updated_data["watchlist"] == [] | ||
assert updated_data["watched"] == [{ | ||
"title": MOVIE_TITLE_1, | ||
"genre": GENRE_1, | ||
"rating": RATING_1 | ||
}] | ||
|
||
|
||
@pytest.mark.skip() | ||
# @pytest.mark.skip() | ||
def test_moves_movie_from_watchlist_to_watched(): | ||
# Arrange | ||
movie_to_watch = HORROR_1 | ||
|
@@ -182,13 +201,18 @@ def test_moves_movie_from_watchlist_to_watched(): | |
# Assert | ||
assert len(updated_data["watchlist"]) == 1 | ||
assert len(updated_data["watched"]) == 2 | ||
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" ********** | ||
# ******************************************************************************************* | ||
assert updated_data["watchlist"] == [ | ||
FANTASY_1 | ||
] | ||
assert updated_data["watched"] == [FANTASY_2, movie_to_watch] | ||
Comment on lines
+209
to
+212
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() | ||
# @pytest.mark.skip() | ||
def test_does_nothing_if_movie_not_in_watchlist(): | ||
# Arrange | ||
movie_to_watch = HORROR_1 | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,9 @@ | |
from viewing_party.party import * | ||
from tests.test_constants import * | ||
|
||
@pytest.mark.skip() | ||
# @pytest.mark.skip() | ||
|
||
|
||
def test_my_unique_movies(): | ||
# Arrange | ||
amandas_data = clean_wave_3_data() | ||
|
@@ -16,7 +18,8 @@ def test_my_unique_movies(): | |
assert INTRIGUE_2 in amandas_unique_movies | ||
assert amandas_data == clean_wave_3_data() | ||
|
||
@pytest.mark.skip() | ||
|
||
# @pytest.mark.skip() | ||
def test_my_not_unique_movies(): | ||
# Arrange | ||
amandas_data = clean_wave_3_data() | ||
|
@@ -28,7 +31,8 @@ def test_my_not_unique_movies(): | |
# Assert | ||
assert len(amandas_unique_movies) == 0 | ||
|
||
@pytest.mark.skip() | ||
|
||
# @pytest.mark.skip() | ||
def test_friends_unique_movies(): | ||
# Arrange | ||
amandas_data = clean_wave_3_data() | ||
|
@@ -43,7 +47,8 @@ def test_friends_unique_movies(): | |
assert FANTASY_4 in friends_unique_movies | ||
assert amandas_data == clean_wave_3_data() | ||
|
||
@pytest.mark.skip() | ||
|
||
# @pytest.mark.skip() | ||
def test_friends_unique_movies_not_duplicated(): | ||
# Arrange | ||
amandas_data = clean_wave_3_data() | ||
|
@@ -55,12 +60,21 @@ def test_friends_unique_movies_not_duplicated(): | |
# Assert | ||
assert len(friends_unique_movies) == 3 | ||
|
||
raise Exception("Test needs to be completed.") | ||
# raise Exception("Test needs to be completed.") | ||
# ************************************************************************************************* | ||
# ****** Add assertions here to test that the correct movies are in friends_unique_movies ********** | ||
# ************************************************************************************************** | ||
assert friends_unique_movies == [ | ||
{'title': 'The Programmer: An Unexpected Stack Trace', | ||
'genre': 'Fantasy', 'rating': 4.0}, | ||
{'title': 'It Came from the Stack Trace', | ||
'genre': 'Horror', 'rating': 3.5}, | ||
{'title': 'Zero Dark Python', 'genre': 'Intrigue', 'rating': 3.0} | ||
] | ||
Comment on lines
+67
to
+73
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() | ||
|
||
|
||
@pytest.mark.skip() | ||
def test_friends_not_unique_movies(): | ||
# Arrange | ||
amandas_data = { | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,8 @@ | |
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 +18,8 @@ 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 = { | ||
|
@@ -27,7 +29,7 @@ def test_new_genre_rec_from_empty_watched(): | |
"watched": [INTRIGUE_1b] | ||
}, | ||
{ | ||
"watched": [INTRIGUE_2b,HORROR_1b] | ||
"watched": [INTRIGUE_2b, HORROR_1b] | ||
} | ||
] | ||
} | ||
|
@@ -38,7 +40,8 @@ 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 = { | ||
|
@@ -52,13 +55,20 @@ def test_new_genre_rec_from_empty_friends(): | |
} | ||
] | ||
} | ||
|
||
raise Exception("Test needs to be completed.") | ||
# raise Exception("Test needs to be completed.") | ||
# ********************************************************************* | ||
# ****** Complete the Act and Assert Portions of these tests ********** | ||
# ********************************************************************* | ||
|
||
@pytest.mark.skip() | ||
# Act | ||
recommendations = get_new_rec_by_genre(sonyas_data) | ||
|
||
# Assert | ||
assert recommendations == [] | ||
assert len(recommendations) == 0 | ||
Comment on lines
+64
to
+68
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 +82,8 @@ def test_unique_rec_from_favorites(): | |
assert INTRIGUE_2b in recommendations | ||
assert sonyas_data == clean_wave_5_data() | ||
|
||
@pytest.mark.skip() | ||
|
||
# @pytest.mark.skip() | ||
def test_unique_from_empty_favorites(): | ||
# Arrange | ||
sonyas_data = { | ||
|
@@ -83,7 +94,7 @@ def test_unique_from_empty_favorites(): | |
"watched": [INTRIGUE_1b] | ||
}, | ||
{ | ||
"watched": [INTRIGUE_2b,HORROR_1b] | ||
"watched": [INTRIGUE_2b, HORROR_1b] | ||
} | ||
] | ||
} | ||
|
@@ -94,7 +105,8 @@ 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.
👍