def test_can_build_sections_from_section_dicts(self): """ Should be able to load the parsed section listings and create Section model instances from them. """ section_dicts = owlxp.parse_sections(self.test_sections_html) # Create a Section model instance for each section_dict semester = Semester.objects.get(year=2013, term=Semester.SUMMER) sections = [] for s in section_dicts: sections.append(Section.objects.create_from_dict(s, semester=semester)) fixtures_filename = "catalogs/fixtures/%s_full.json" % semester.code utils.dump_catalog_fixtures(fixtures_filename)
def test_can_parse_section_listings(self): """ Should be able to parse section listings HTML into dicts representing each section. """ section_dicts = owlxp.parse_sections(self.test_sections_html)