Simple Attributes

Create an empty class Cookie. Create two instances of it. One of them named cookie1 and the other cookie2. cookie1 should have an attribute scarf with the value "green" and cookie2 should have an attribute buttons with the value "blue".

import unittest


class AttributesTestCase(unittest.TestCase):

    def test_cookie1_attributes(self):
        self.assertTrue(isinstance(cookie1, Cookie))
        self.assertTrue(isinstance(cookie1, object))

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

    def test_cookie2_attributes(self):
        self.assertTrue(isinstance(cookie2, Cookie))
        self.assertTrue(isinstance(cookie2, object))

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