Exemplo n.º 1
0
def test_that_ratingDictionary_item_length_matches_userList_length():
	assert len(returnRatingDictionary()[1]) == len(returnUserList())
Exemplo n.º 2
0
def test_that_ratingDictionary_is_a_dictionary():
	result = returnRatingDictionary()
	assert isinstance(result, dict)
Exemplo n.º 3
0
def test_that_ratingDictionary_length_matches_number_of_movies():
	assert len(returnRatingDictionary()) == len(returnMovieData())
Exemplo n.º 4
0
from app.itemItemRecommender import returnMovieData, returnRatingDictionary, returnUserList, returnRatingData, averageRating, ratingDataFrame

#Setup
ratingDictionary = returnRatingDictionary()


def test_that_movieData_is_list():
	result = returnMovieData()
	assert isinstance(result, list)

def test_that_movieData_is_a_list_of_lists():
	result = returnMovieData()[0]
	assert isinstance(result, list)

def test_that_movieData_has_24_columns():
	result = len(returnMovieData()[0])
	assert result == 24

def test_that_ratingDictionary_is_a_dictionary():
	result = returnRatingDictionary()
	assert isinstance(result, dict)

def test_that_ratingDictionary_length_matches_number_of_movies():
	assert len(returnRatingDictionary()) == len(returnMovieData())

def test_that_ratingDictionary_item_length_matches_userList_length():
	assert len(returnRatingDictionary()[1]) == len(returnUserList())

def test_that_userList_is_a_list():
	assert isinstance(returnUserList(), list)