'metadata: check handling of None metadata values'

def test_album_metadata_with_None(self):

    row = _MockDatabaseRow({'ArtistName': 'artist', 'AlbumTitle': 'Album', 'Type': None, 'ReleaseDate': None})
    mb = _md.AlbumMetadataBuilder()
    f1 = _MockMediaFile('artist', None, None, None, None, None)
    mb.add_media_file(f1)
    f2 = _MockMediaFile('artist', None, None, 2, 'track2', None)
    mb.add_media_file(f2)
    md = _md.album_metadata('/music/Artist    -    Album    [2002]', row, mb.build())
    if (not _h.SYS_ENCODING):
        _h.SYS_ENCODING = 'UTF-8'
    res = _hp.replace_all('/music/$First/$Artist/$Artist    -    $Album{    [$Year]}', md, True)
    self.assertEqual(res, u'/music/A/artist/artist    -    Album', 'check    correct    rendering    of    None    via    replace_all()')
