forked from Ada-C22/viewing-party
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
468 additions
and
765 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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# import source code | ||
from viewing_party.party import * | ||
|
||
# import test data | ||
from tests.test_constants import * | ||
|
||
# import "pretty-print" library | ||
import pprint | ||
pp = pprint.PrettyPrinter(indent=4) | ||
|
||
# play testing section | ||
print("\n-----Wave 01 test data-----") | ||
pp.pprint(HORROR_1) | ||
pp.pprint(FANTASY_1) | ||
pp.pprint(FANTASY_2) | ||
|
||
# print("\n-----Wave 02 user_data-----") | ||
# pp.pprint(clean_wave_2_data()) | ||
|
||
#print("\n-----Wave 03 user_data-----") | ||
#pp.pprint(clean_wave_3_data()) | ||
|
||
# Wave 04 user data | ||
#print("\n-----Wave 04 user_data-----") | ||
#pp.pprint(clean_wave_4_data()) | ||
|
||
# Wave 05 user data | ||
#print("\n-----Wave 05 user_data-----") | ||
#pp.pprint(clean_wave_5_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 |
---|---|---|
@@ -0,0 +1,183 @@ | ||
import copy | ||
|
||
# ******************************** | ||
# *** Do Not Modify This File **** | ||
# ******************************** | ||
|
||
# Data for Unit Tests | ||
|
||
#----------WAVE01------------- | ||
MOVIE_TITLE_1 = "It Came from the Stack Trace" | ||
GENRE_1 = "Horror" | ||
RATING_1 = 3.5 | ||
|
||
#----------WAVE02------------- | ||
HORROR_1 = { | ||
"title": MOVIE_TITLE_1, | ||
"genre": GENRE_1, | ||
"rating": RATING_1 | ||
} | ||
FANTASY_1 = { | ||
"title": "The Lord of the Functions: The Fellowship of the Function", | ||
"genre": "Fantasy", | ||
"rating": 4.8 | ||
} | ||
FANTASY_2 = { | ||
"title": "The Lord of the Functions: The Two Parameters", | ||
"genre": "Fantasy", | ||
"rating": 4.0 | ||
} | ||
FANTASY_3 = { | ||
"title": "The Lord of the Functions: The Return of the Value", | ||
"genre": "Fantasy", | ||
"rating": 4.0 | ||
} | ||
FANTASY_4 = { | ||
"title": "The Programmer: An Unexpected Stack Trace", | ||
"genre": "Fantasy", | ||
"rating": 4.0 | ||
} | ||
ACTION_1 = { | ||
"title": "The JavaScript and the React", | ||
"genre": "Action", | ||
"rating": 2.2 | ||
} | ||
ACTION_2 = { | ||
"title": "2 JavaScript 2 React", | ||
"genre": "Action", | ||
"rating": 4.2 | ||
} | ||
ACTION_3 = { | ||
"title": "JavaScript 3: VS Code Lint", | ||
"genre": "Action", | ||
"rating": 3.5 | ||
} | ||
INTRIGUE_1 = { | ||
"title": "Recursion", | ||
"genre": "Intrigue", | ||
"rating": 2.0 | ||
} | ||
INTRIGUE_2 = { | ||
"title": "Instructor Student TA Manager", | ||
"genre": "Intrigue", | ||
"rating": 4.5 | ||
} | ||
INTRIGUE_3 = { | ||
"title": "Zero Dark Python", | ||
"genre": "Intrigue", | ||
"rating": 3.0 | ||
} | ||
USER_DATA_2 = { | ||
"watched": [ | ||
FANTASY_1, | ||
FANTASY_2, | ||
FANTASY_3, | ||
ACTION_1, | ||
INTRIGUE_1, | ||
INTRIGUE_2 | ||
], | ||
} | ||
|
||
#-----WAVE 3-------- | ||
USER_DATA_3 = copy.deepcopy(USER_DATA_2) | ||
USER_DATA_3["friends"] = [ | ||
{ | ||
"watched": [ | ||
FANTASY_1, | ||
FANTASY_3, | ||
FANTASY_4, | ||
HORROR_1, | ||
] | ||
}, | ||
{ | ||
"watched": [ | ||
FANTASY_1, | ||
ACTION_1, | ||
INTRIGUE_1, | ||
INTRIGUE_3, | ||
] | ||
} | ||
] | ||
|
||
#-----WAVE 4-------- | ||
|
||
HORROR_1b = copy.deepcopy(HORROR_1) | ||
FANTASY_1b = copy.deepcopy(FANTASY_1) | ||
FANTASY_2b = copy.deepcopy(FANTASY_2) | ||
FANTASY_3b = copy.deepcopy(FANTASY_3) | ||
FANTASY_4b = copy.deepcopy(FANTASY_4) | ||
ACTION_1b = copy.deepcopy(ACTION_1) | ||
ACTION_2b = copy.deepcopy(ACTION_2) | ||
ACTION_3b = copy.deepcopy(ACTION_3) | ||
INTRIGUE_1b = copy.deepcopy(INTRIGUE_1) | ||
INTRIGUE_2b = copy.deepcopy(INTRIGUE_2) | ||
INTRIGUE_3b = copy.deepcopy(INTRIGUE_3) | ||
|
||
HORROR_1b["host"] = "netflix" | ||
FANTASY_1b["host"] = "netflix" | ||
FANTASY_2b["host"] = "netflix" | ||
FANTASY_3b["host"] = "amazon" | ||
FANTASY_4b["host"] = "hulu" | ||
ACTION_1b["host"] = "amazon" | ||
ACTION_2b["host"] = "amazon" | ||
ACTION_3b["host"] = "hulu" | ||
INTRIGUE_1b["host"] = "hulu" | ||
INTRIGUE_2b["host"] = "disney+" | ||
INTRIGUE_3b["host"] = "disney+" | ||
|
||
USER_DATA_4 = { | ||
"watched": [ | ||
FANTASY_1b, | ||
FANTASY_2b, | ||
FANTASY_3b, | ||
ACTION_1b, | ||
INTRIGUE_1b, | ||
INTRIGUE_2b | ||
], | ||
"friends": [ | ||
{ | ||
"watched": [ | ||
FANTASY_1b, | ||
FANTASY_3b, | ||
FANTASY_4b, | ||
HORROR_1b, | ||
] | ||
}, | ||
{ | ||
"watched": [ | ||
FANTASY_1b, | ||
ACTION_1b, | ||
INTRIGUE_1b, | ||
INTRIGUE_3b, | ||
] | ||
} | ||
] | ||
} | ||
|
||
USER_DATA_4["subscriptions"] = ["netflix", "hulu"] | ||
|
||
|
||
#----WAVE 5----------- | ||
|
||
USER_DATA_5 = copy.deepcopy(USER_DATA_4) | ||
|
||
USER_DATA_5["favorites"] = [ | ||
FANTASY_1b, | ||
FANTASY_2b, | ||
INTRIGUE_1b, | ||
INTRIGUE_2b | ||
] | ||
|
||
#----Functions that return clean data for each test---- | ||
|
||
def clean_wave_2_data(): | ||
return copy.deepcopy(USER_DATA_2) | ||
|
||
def clean_wave_3_data(): | ||
return copy.deepcopy(USER_DATA_3) | ||
|
||
def clean_wave_4_data(): | ||
return copy.deepcopy(USER_DATA_4) | ||
|
||
def clean_wave_5_data(): | ||
return copy.deepcopy(USER_DATA_5) |
Oops, something went wrong.