-
Notifications
You must be signed in to change notification settings - Fork 29
Sphinx - Sarah Koch and Salma Anany #22
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
base: main
Are you sure you want to change the base?
Changes from all commits
c1a004c
afbb378
3a402b6
fcece58
eba0c6f
c9d710d
ba1c3b9
8388381
32d9de6
5b35a23
721c540
fb72097
a3f6d60
5fbb015
975c107
ae7c208
2a277cb
aa28e59
ee3431f
ab10bec
9861387
ae66c23
40f9535
b2fe61b
9de130c
5d2c539
3380b80
0e2390f
3e3603f
f18e10f
1ac0638
404c24b
7afc59d
abc8360
c871272
ceaf7ce
b952f0e
12a43db
b9ff167
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
from viewing_party.party import * | ||
from tests.test_constants import * | ||
|
||
@pytest.mark.skip() | ||
def test_create_successful_movie(): | ||
# Arrange | ||
movie_title = MOVIE_TITLE_1 | ||
|
@@ -19,7 +18,6 @@ def test_create_successful_movie(): | |
assert new_movie["genre"] == GENRE_1 | ||
assert new_movie["rating"] == pytest.approx(RATING_1) | ||
|
||
@pytest.mark.skip() | ||
def test_create_no_title_movie(): | ||
# Arrange | ||
movie_title = None | ||
|
@@ -32,7 +30,6 @@ def test_create_no_title_movie(): | |
# Assert | ||
assert new_movie is None | ||
|
||
@pytest.mark.skip() | ||
def test_create_no_genre_movie(): | ||
# Arrange | ||
movie_title = "Title A" | ||
|
@@ -45,7 +42,6 @@ def test_create_no_genre_movie(): | |
# Assert | ||
assert new_movie is None | ||
|
||
@pytest.mark.skip() | ||
def test_create_no_rating_movie(): | ||
# Arrange | ||
movie_title = "Title A" | ||
|
@@ -58,7 +54,6 @@ def test_create_no_rating_movie(): | |
# Assert | ||
assert new_movie is None | ||
|
||
@pytest.mark.skip() | ||
def test_adds_movie_to_user_watched(): | ||
# Arrange | ||
movie = { | ||
|
@@ -79,7 +74,6 @@ 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() | ||
def test_adds_movie_to_non_empty_user_watched(): | ||
# Arrange | ||
movie = { | ||
|
@@ -99,7 +93,6 @@ 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() | ||
def test_adds_movie_to_user_watchlist(): | ||
# Arrange | ||
movie = { | ||
|
@@ -120,7 +113,6 @@ 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() | ||
def test_adds_movie_to_non_empty_user_watchlist(): | ||
# Arrange | ||
movie = { | ||
|
@@ -140,7 +132,6 @@ 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() | ||
def test_moves_movie_from_watchlist_to_empty_watched(): | ||
# Arrange | ||
janes_data = { | ||
|
@@ -158,13 +149,10 @@ 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.") | ||
# ******************************************************************************************* | ||
# ****** Add assertions here to test that the correct movie was added to "watched" ********** | ||
# ******************************************************************************************* | ||
assert updated_data["watched"][0]["title"] == MOVIE_TITLE_1 | ||
assert updated_data["watched"][0]["genre"] == GENRE_1 | ||
assert updated_data["watched"][0]["rating"] == RATING_1 | ||
Comment on lines
+152
to
+154
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. Nice job adding assertions to this test 👍 |
||
|
||
@pytest.mark.skip() | ||
def test_moves_movie_from_watchlist_to_watched(): | ||
# Arrange | ||
movie_to_watch = HORROR_1 | ||
|
@@ -182,13 +170,10 @@ 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.") | ||
# ******************************************************************************************* | ||
# ****** Add assertions here to test that the correct movie was added to "watched" ********** | ||
# ******************************************************************************************* | ||
assert updated_data["watched"][1]["title"] == movie_to_watch["title"] | ||
assert updated_data["watched"][1]["genre"] == movie_to_watch["genre"] | ||
assert updated_data["watched"][1]["rating"] == movie_to_watch["rating"] | ||
Comment on lines
+173
to
+175
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. You could capture the logic written in lines 173-175 as: assert HORROR_1 in updated_data["watched"] Also since you're testing that HORROR_1 is in the watched list, you might also to test that HORROR_1 is not in the watchlist. |
||
|
||
@pytest.mark.skip() | ||
def test_does_nothing_if_movie_not_in_watchlist(): | ||
# Arrange | ||
movie_to_watch = HORROR_1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
from viewing_party.party import * | ||
from tests.test_constants import * | ||
|
||
@pytest.mark.skip() | ||
def test_my_unique_movies(): | ||
# Arrange | ||
amandas_data = clean_wave_3_data() | ||
|
@@ -16,7 +15,6 @@ def test_my_unique_movies(): | |
assert INTRIGUE_2 in amandas_unique_movies | ||
assert amandas_data == clean_wave_3_data() | ||
|
||
@pytest.mark.skip() | ||
def test_my_not_unique_movies(): | ||
# Arrange | ||
amandas_data = clean_wave_3_data() | ||
|
@@ -28,7 +26,6 @@ def test_my_not_unique_movies(): | |
# Assert | ||
assert len(amandas_unique_movies) == 0 | ||
|
||
@pytest.mark.skip() | ||
def test_friends_unique_movies(): | ||
# Arrange | ||
amandas_data = clean_wave_3_data() | ||
|
@@ -43,7 +40,6 @@ def test_friends_unique_movies(): | |
assert FANTASY_4 in friends_unique_movies | ||
assert amandas_data == clean_wave_3_data() | ||
|
||
@pytest.mark.skip() | ||
def test_friends_unique_movies_not_duplicated(): | ||
# Arrange | ||
amandas_data = clean_wave_3_data() | ||
|
@@ -54,13 +50,10 @@ def test_friends_unique_movies_not_duplicated(): | |
|
||
# Assert | ||
assert len(friends_unique_movies) == 3 | ||
|
||
raise Exception("Test needs to be completed.") | ||
# ************************************************************************************************* | ||
# ****** Add assertions here to test that the correct movies are in friends_unique_movies ********** | ||
# ************************************************************************************************** | ||
|
||
@pytest.mark.skip() | ||
assert INTRIGUE_3 in friends_unique_movies | ||
assert FANTASY_4 in friends_unique_movies | ||
assert HORROR_1 in friends_unique_movies | ||
Comment on lines
+53
to
+55
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. 👍 Nice job checking that the correct movies are in assert INTRIGUE_3 not in amandas_data["watched"] |
||
|
||
def test_friends_not_unique_movies(): | ||
# Arrange | ||
amandas_data = { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
from viewing_party.party import * | ||
from tests.test_constants import * | ||
|
||
@pytest.mark.skip() | ||
def test_new_genre_rec(): | ||
# Arrange | ||
sonyas_data = clean_wave_5_data() | ||
|
@@ -17,7 +16,6 @@ def test_new_genre_rec(): | |
assert FANTASY_4b in recommendations | ||
assert sonyas_data == clean_wave_5_data() | ||
|
||
@pytest.mark.skip() | ||
def test_new_genre_rec_from_empty_watched(): | ||
# Arrange | ||
sonyas_data = { | ||
|
@@ -38,7 +36,6 @@ def test_new_genre_rec_from_empty_watched(): | |
# Assert | ||
assert len(recommendations) == 0 | ||
|
||
@pytest.mark.skip() | ||
def test_new_genre_rec_from_empty_friends(): | ||
# Arrange | ||
sonyas_data = { | ||
|
@@ -53,12 +50,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) | ||
|
||
@pytest.mark.skip() | ||
# Assert | ||
assert len(recommendations) == 0 | ||
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. Writing the assertion |
||
|
||
def test_unique_rec_from_favorites(): | ||
# Arrange | ||
sonyas_data = clean_wave_5_data() | ||
|
@@ -72,7 +69,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 +90,6 @@ def test_unique_from_empty_favorites(): | |
# Assert | ||
assert len(recommendations) == 0 | ||
|
||
@pytest.mark.skip() | ||
def test_new_rec_from_empty_friends(): | ||
# Arrange | ||
sonyas_data = { | ||
|
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.
Did you mean to add and commit these files in the .idea directory? I don't think these changes are needed for the project and should be removed from the tracked changes before opening a PR.
While adding these changes as a PR, doesn't affect this project right now, when you're in industry it's best practice to only commit changes relevant to your work so that the codebase doesn't become cluttered. Be sure to review what files you have staged for commit before you add them so that you don't add files that shouldn't be tracked to the commit history.