Exemplo n.º 1
0
    def test_unit__marshmallow_output_processor__ok__missing_data(self):
        processor = MarshmallowProcessor()
        processor.set_schema(MySchema())

        tested_data = {"last_name": "Turing"}

        with pytest.raises(ValidationException):
            processor.dump(tested_data)
Exemplo n.º 2
0
    def test_unit__marshmallow_output_processor__ok__process_success(self):
        processor = MarshmallowProcessor()
        processor.set_schema(MySchema())

        tested_data = {"first_name": "Alan", "last_name": "Turing"}
        data = processor.dump(tested_data)

        assert data == tested_data