# -*- coding: utf-8 -*-
import pytest

from swagger_parser import SwaggerParser


@pytest.fixture
def swagger_parser():
    return SwaggerParser('tests/swagger.yaml')


@pytest.fixture
def pet_definition_example():
    return {
        'category': {
            'id': 42,
            'name': 'string'
        },
        'status': 'string',
        'name': 'doggie',
        'tags': [
            {
                'id': 42,
                'name': 'string'
            }
        ],
        'photoUrls': [
            'string',
            'string2'
        ],
        'id': 42
    }


@pytest.fixture
def path_data_example():
    return {'put': {'responses': {
        '200': {'description': 'Created', 'schema': {'x-scope': [''],
                                                     '$ref': '#/definitions/Pet'}},
        '405': {'description': 'Validation exception'},
        '404': {'description': 'Pet not found'},
        '400': {'description': 'Invalid ID supplied'},
    }, 'parameters': {'body': {
        'required': False,
        'in': 'body',
        'description': 'µPet øbject that needs to be added to the store !',
        'name': 'body',
        'schema': {'x-scope': [''], '$ref': '#/definitions/Pet'},
    }}}, 'post': {'responses': {'201': {'description': 'Created',
                                        'schema': {'x-scope': [''],
                                                   '$ref': '#/definitions/Pet'}},
                                '405': {'description': 'Invalid input'}},
                  'parameters': {'body': {
                      'required': False,
                      'in': 'body',
                      'description': 'µPet øbject that needs to be added to the store !',
                      'name': 'body',
                      'schema': {'x-scope': [''], '$ref': '#/definitions/Pet'},
                  }}}}

@@ -1065,38 +1065,37 @@
 'description': '
-%C2%B5
 Pet 
-%C3%B8
+o
 bject that needs
@@ -1112,33 +1112,65 @@
 ed to the store 
-!
+(it may be a %C2%B5Pig or a Sm%C3%B8rebr%C3%B6d)
 ',%0A        'name
@@ -1698,14 +1698,13 @@
 ': '
-%C2%B5
 Pet 
-%C3%B8
+o
 bjec
@@ -1745,9 +1745,41 @@
 ore 
-!
+(it may be a %C2%B5Pig or a Sm%C3%B8rebr%C3%B6d)
 ',%0A 

use same text as in test yaml