'pathrender: _Replacement variable substitution'

def test_replacement(self):

    r = _pr._Replacement(u'$Title')
    subst = {'$Title': 'foo', '$Track': 'bar'}
    res = r.render(subst)
    self.assertEqual(res, u'foo', 'check    valid    replacement')
    subst = {}
    res = r.render(subst)
    self.assertEqual(res, u'$Title', 'check    missing    replacement')
    subst = {'$Title': None}
    res = r.render(subst)
    self.assertEqual(res, '', 'check    render()    works    with    None')
