old_contents: # coding: utf-8
  
  from __future__ import division, absolute_import, unicode_literals
  
  from owlmixin.owlenum import OwlObjectEnum
  
  
  class Color(OwlObjectEnum):
      RED = (
          "red",
          {"japanese": "赤", "coloring": lambda m: "Red: " + m}
      )
  
      GREEN = (
          "green",
          {"japanese": "緑", "coloring": lambda m: "Green: " + m}
      )
  
      BLUE = (
          "blue",
          {"japanese": "青", "coloring": lambda m: "Blue: " + m}
      )
  
      @property
      def japanese(self):
          return self.object["japanese"]
  
      def coloring(self, message):
          return self.object["coloring"](message)
  
  
  class TestFromSymbol:
      def test_normal(self):
          assert Color.from_symbol("blue") is Color.BLUE
  
  
  class TestProperty:
      def test_normal(self):
          assert Color.BLUE.japanese == "青"
  
  
  class TestFunction:
      def test_normal(self):
          assert Color.BLUE.coloring("sky") == "Blue: sky"
  
new_contents: # coding: utf-8
  
  from __future__ import division, absolute_import, unicode_literals
  
  from owlmixin import OwlMixin
  from owlmixin.owlenum import OwlObjectEnum
  
  
  class Sample(OwlMixin):
      def __init__(self, color):
          self.color = Color.from_symbol(color)
  
  
  class Color(OwlObjectEnum):
      RED = (
          "red",
          {"japanese": "赤", "coloring": lambda m: "Red: " + m}
      )
  
      GREEN = (
          "green",
          {"japanese": "緑", "coloring": lambda m: "Green: " + m}
      )
  
      BLUE = (
          "blue",
          {"japanese": "青", "coloring": lambda m: "Blue: " + m}
      )
  
      @property
      def japanese(self):
          return self.object["japanese"]
  
      def coloring(self, message):
          return self.object["coloring"](message)
  
  
  class TestFromSymbol:
      def test_normal(self):
          assert Color.from_symbol("blue") is Color.BLUE
  
  
  class TestProperty:
      def test_normal(self):
          assert Color.BLUE.japanese == "青"
  
  
  class TestFunction:
      def test_normal(self):
          assert Color.BLUE.coloring("sky") == "Blue: sky"
  
  
  class TestOwlMixin:
      def test_to_dict(self):
          assert Sample.from_dict({"color": "blue"}).to_dict() == {
              "color": Color.BLUE
          }
  
      def test_to_json(self):
          assert Sample.from_dict({"color": "blue"}).to_json() == '{"color": "blue"}'
  
subject: Add tests