'Make sure that metadata is inherited properly'

def test_metadata_inherit(self):

    print 'Starting    import'
    course = self.get_course('toy')
    def check_for_key(key, node, value):
        'recursive    check    for    presence    of    key'
        print 'Checking    {0}'.format(node.location.to_deprecated_string())
        self.assertEqual(getattr(node, key), value)
        for c in node.get_children():
            check_for_key(key, c, value)
    check_for_key('graceperiod', course, course.graceperiod)
