Exemplo n.º 1
0
 def test_pick_related_subsidiary(self):
     self.assertEqual(
         pick_company_for_brand(
             {'Sealy'},
             {'Tempur'},
             {'Sealy': 1, 'Tempur-Pedic': 1, 'Tempur Sealy': 0}),
         'Tempur-Pedic')
Exemplo n.º 2
0
 def test_pick_deepest_company(self):
     self.assertEqual(
         pick_company_for_brand(
             {'Rose Art', 'MEGA Brands'},
             {'Rose Art'},
             {'MEGA Brands': 1, 'Mattel': 0}),
         'MEGA Brands')
Exemplo n.º 3
0
 def test_dont_pick_unrelated_subsidiary(self):
     self.assertEqual(
         pick_company_for_brand(
             {'Unilever'},
             {'Dove'},
             {'Unilever': 0, "Ben & Jerry's": 1}),
         'Unilever')
Exemplo n.º 4
0
 def test_one(self):
     self.assertEqual(
         pick_company_for_brand(
             {'Clorox'}, {'Liquid-Plumr'}, {'Clorox': 0}),
         'Clorox')