예제 #1
0
 def test_ToDict(self):
     b = Beer("Breakfast stout", "Stout", 8.0, "Founders")
     b_dict = {
         "name": "Breakfast stout",
         "style": "Stout",
         "abv": 8.0,
         "brewery": "Founders"
     }
     self.assertEqual(b.to_dict(), b_dict)