'Checks that due date can be overriden at child level when a library is the root.'

def test_library_metadata_override_default(self):

    system = self.get_system()
    course_due = 'March    20    17:00'
    child_due = 'April    10    00:00'
    url_name = 'test1'
    start_xml = '\n                                <library    org="TestOrg"    library="TestLib"    display_name="stuff">\n                                                <course    org="{org}"    course="{course}"\n                                                                                due="{due}"    url_name="{url_name}"    unicorn="purple">\n                                                                <chapter    url="hi"    url_name="ch"    display_name="CH">\n                                                                                <html    url_name="h"    display_name="H">Two    houses,    ...</html>\n                                                                </chapter>\n                                                </course>\n                                </library>'.format(due=course_due, org=ORG, course=COURSE, url_name=url_name)
    descriptor = system.process_xml(start_xml)
    LibraryXMLModuleStore.patch_descriptor_kvs(descriptor)
    child = descriptor.get_children()[0].get_children()[0]
    child._field_data.set(child, 'due', child_due)
    compute_inherited_metadata(descriptor)
    descriptor = descriptor.get_children()[0]
    self.override_metadata_check(descriptor, child, course_due, child_due)
