import unittest
import jsonschema
from rest.parsers.winston_parser import WinstonParser


class TestWinstonParser(unittest.TestCase):
    def test_valid_payload(self):
        payload = {
            "reporter": "John Doe",
            "location": {
                "floor": 7
            }
        }
        try:
            WinstonParser(payload).validate()
        except Exception as e:
            self.fail(f"test_valid_schema() raised {e.__class__.__name__}")

    def test_invalid_payload(self):
        payload = {
            "reporter": "John Doe"
        }
        with self.assertRaises(jsonschema.exceptions.ValidationError):
            WinstonParser(payload).validate()

cbc6a5ec6afd0c2c81b79d44393a31b3b6f3ea99
<mask token>


class TestWinstonParser(unittest.TestCase):
    <mask token>
    <mask token>

<mask token>


class TestWinstonParser(unittest.TestCase):
    <mask token>

    def test_invalid_payload(self):
        payload = {'reporter': 'John Doe'}
        with self.assertRaises(jsonschema.exceptions.ValidationError):
            WinstonParser(payload).validate()

<mask token>


class TestWinstonParser(unittest.TestCase):

    def test_valid_payload(self):
        payload = {'reporter': 'John Doe', 'location': {'floor': 7}}
        try:
            WinstonParser(payload).validate()
        except Exception as e:
            self.fail(f'test_valid_schema() raised {e.__class__.__name__}')

    def test_invalid_payload(self):
        payload = {'reporter': 'John Doe'}
        with self.assertRaises(jsonschema.exceptions.ValidationError):
            WinstonParser(payload).validate()

import unittest
import jsonschema
from rest.parsers.winston_parser import WinstonParser


class TestWinstonParser(unittest.TestCase):

    def test_valid_payload(self):
        payload = {'reporter': 'John Doe', 'location': {'floor': 7}}
        try:
            WinstonParser(payload).validate()
        except Exception as e:
            self.fail(f'test_valid_schema() raised {e.__class__.__name__}')

    def test_invalid_payload(self):
        payload = {'reporter': 'John Doe'}
        with self.assertRaises(jsonschema.exceptions.ValidationError):
            WinstonParser(payload).validate()

import unittest
import jsonschema
from rest.parsers.winston_parser import WinstonParser


class TestWinstonParser(unittest.TestCase):
    def test_valid_payload(self):
        payload = {
            "reporter": "John Doe",
            "location": {
                "floor": 7
            }
        }
        try:
            WinstonParser(payload).validate()
        except Exception as e:
            self.fail(f"test_valid_schema() raised {e.__class__.__name__}")

    def test_invalid_payload(self):
        payload = {
            "reporter": "John Doe"
        }
        with self.assertRaises(jsonschema.exceptions.ValidationError):
            WinstonParser(payload).validate()
