Simple Initialization

Create a simple class Cookie that is initialized by providing two arguments: scarf and buttons. The class should initialize the both arguments and also a third one hat that should be None. Example:

c1 = Cookie(scarf='green', buttons='blue')
print(c1.scarf)  # 'green'
print(c1.buttons)  # 'blue'
print(c1.hat)  # None

c2 = Cookie(scarf='yellow', buttons='red')
print(c2.scarf)  # 'yellow'
print(c2.buttons)  # 'red'
print(c2.hat)  # None
import unittest


class InitTestCase(unittest.TestCase):

    def test_init_attributes(self):
        c1 = Cookie(scarf='green', buttons='blue')
        self.assertTrue(isinstance(c1, object))

        self.assertTrue(hasattr(c1, 'scarf'))
        self.assertEqual(c1.scarf, 'green')

        self.assertTrue(hasattr(c1, 'buttons'))
        self.assertEqual(c1.buttons, 'blue')

        self.assertTrue(hasattr(c1, 'hat'))
        self.assertIsNone(c1.hat)