def test_major_with_known_link(self): assert berkeley.degree_program_url_for_major('English BA') == \ 'http://guide.berkeley.edu/undergraduate/degree-programs/english/' assert berkeley.degree_program_url_for_major('Peace & Conflict Studies BA') == \ 'http://guide.berkeley.edu/undergraduate/degree-programs/peace-conflict-studies/' assert berkeley.degree_program_url_for_major('History BA') == \ 'http://guide.berkeley.edu/undergraduate/degree-programs/history/' assert berkeley.degree_program_url_for_major('History of Art BA') == \ 'http://guide.berkeley.edu/undergraduate/degree-programs/art-history/'
def test_major_without_a_link(self): assert berkeley.degree_program_url_for_major( 'English for Billiards Players MS') is None assert berkeley.degree_program_url_for_major( 'Altaic Language BA') is None assert berkeley.degree_program_url_for_major('Entomology BS') is None