def test_enum_test(self):
        """ deserialize dict(str, Enum_Test) """
        data = {
            'enum_test': {
                "enum_string": "UPPER",
                "enum_string_required": "lower",
                "enum_integer": 1,
                "enum_number": 1.1,
                "outerEnum": "placed"
            }
        }
        response = MockResponse(data=json.dumps(data))

        deserialized = self.deserialize(response, 'dict(str, EnumTest)')
        self.assertTrue(isinstance(deserialized, dict))
        self.assertTrue(
            isinstance(deserialized['enum_test'], petstore_api.EnumTest))
        outer_enum_value = (petstore_api.OuterEnum.allowed_values[(
            'value', )]["PLACED"])
        outer_enum = petstore_api.OuterEnum(outer_enum_value)
        sample_instance = petstore_api.EnumTest(enum_string="UPPER",
                                                enum_string_required="lower",
                                                enum_integer=1,
                                                enum_number=1.1,
                                                outer_enum=outer_enum)
        self.assertEqual(deserialized['enum_test'], sample_instance)
    def test_enum_test(self):
        """ deserialize dict(str, Enum_Test) """
        data = {
            'enum_test': {
                "enum_string": "UPPER",
                "enum_integer": 1,
                "enum_number": 1.1,
                "outerEnum": "placed"
            }
        }

        deserialized = self.deserialize(data, 'dict(str, EnumTest)')
        self.assertTrue(isinstance(deserialized, dict))
        self.assertTrue(isinstance(deserialized['enum_test'], petstore_api.EnumTest))
        self.assertEqual(deserialized['enum_test'],
                         petstore_api.EnumTest(enum_string="UPPER",
                                               enum_integer=1,
                                               enum_number=1.1,
                                               outer_enum=petstore_api.OuterEnum.PLACED))