Traffic light

Define a function traffic_light that receives a color and returns:

'stop' if the color is red

'slow down' if the color is yellow

'go' if the color is green

Examples:

>>> traffic_light('red')
'stop'
>>> traffic_light('yellow')
'slow down'
>>> traffic_light('green')
'go'
import unittest


class TrafficLightTestCase(unittest.TestCase):

    def test_red_light(self):
        self.assertEqual(traffic_light('red'), 'stop')

    def test_yellow_light(self):
        self.assertEqual(traffic_light('yellow'), 'slow down')

    def test_green_light(self):
        self.assertEqual(traffic_light('green'), 'go')