Exemplo n.º 1
0
    def test_decode_path_error():
        """ Test that the JsonDeserializer.decode_collection raises an error if no decoding is defined. """
        # Arrange
        value = {"foo": "bar"}

        # Act & Assert
        with pytest.raises(NotImplementedError):
            JsonDeserializer.decode_path(value)
Exemplo n.º 2
0
    def test_decode_path(value, expected):
        """ Test that the JsonDeserializer.decode_collection decodes collections as expected. """
        # Arrange

        # Act
        result = JsonDeserializer.decode_path(value)

        # Assert
        assert result == expected