generated from mwc/lab_weather
friend_functions.py
This commit is contained in:
@@ -11,8 +11,8 @@ from people import friends, family
|
||||
from friend_functions import (
|
||||
# count_people,
|
||||
# get_email,
|
||||
count_favorite_colors,
|
||||
# people_who_like_color,
|
||||
# count_favorite_colors,
|
||||
people_who_like_color,
|
||||
# count_people_who_like_color,
|
||||
# get_color_dict,
|
||||
)
|
||||
@@ -30,24 +30,24 @@ from friend_functions import (
|
||||
# def test_returns_none_when_person_missing(self):
|
||||
# self.assertEqual(get_email(family, "Ken Kesey"), None)
|
||||
|
||||
class TestCountFavoriteColors(TestCase):
|
||||
def test_returns_len_favorite_colors_when_person_found(self):
|
||||
self.assertEqual(count_favorite_colors(family, "Tad Winters"), 2)
|
||||
self.assertEqual(count_favorite_colors(friends,"Connor Rodriguez"), 4)
|
||||
self.assertEqual(count_favorite_colors(friends, "Yuli Reynolds"), 0)
|
||||
# class TestCountFavoriteColors(TestCase):
|
||||
# def test_returns_len_favorite_colors_when_person_found(self):
|
||||
# self.assertEqual(count_favorite_colors(family, "Tad Winters"), 2)
|
||||
# self.assertEqual(count_favorite_colors(friends,"Connor Rodriguez"), 4)
|
||||
# self.assertEqual(count_favorite_colors(friends, "Yuli Reynolds"), 0)
|
||||
|
||||
def test_returns_none_when_person_missing(self):
|
||||
self.assertEqual(count_favorite_colors(family, "Ken Kesey"), None)
|
||||
# def test_returns_none_when_person_missing(self):
|
||||
# self.assertEqual(count_favorite_colors(family, "Ken Kesey"), None)
|
||||
|
||||
# class TestPeopleWhoLikeColor(TestCase):
|
||||
# def test_returns_correct_length(self):
|
||||
# self.assertEqual(len(people_who_like_color(family, "blue")), 2)
|
||||
# self.assertEqual(len(people_who_like_color(family, "purple")), 0)
|
||||
class TestPeopleWhoLikeColor(TestCase):
|
||||
def test_returns_correct_length(self):
|
||||
self.assertEqual(len(people_who_like_color(family, "blue")), 2)
|
||||
self.assertEqual(len(people_who_like_color(family, "purple")), 0)
|
||||
|
||||
# def test_returns_full_dicts(self):
|
||||
# result = people_who_like_color(family, "orange")
|
||||
# self.assertEqual(len(result), 1)
|
||||
# self.assertEqual(result[0]["email"], "auctor.odio@icloud.ca")
|
||||
def test_returns_full_dicts(self):
|
||||
result = people_who_like_color(family, "orange")
|
||||
self.assertEqual(len(result), 1)
|
||||
self.assertEqual(result[0]["email"], "auctor.odio@icloud.ca")
|
||||
|
||||
# class TestCountPeopleWhoLikeColor(TestCase):
|
||||
# def test_returns_correct_count(self):
|
||||
|
||||
Reference in New Issue
Block a user