Example #1
0
    def test_decode_collection_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_collection(value)
Example #2
0
    def test_decode_collection(value, expected):
        """ Test that the JsonDeserializer.decode_collection decodes collections as expected. """
        # Arrange

        # Act
        result = JsonDeserializer.decode_collection(value)

        # Assert
        assert result == expected