def setup_class(cls): Keywords.search().delete() Faculty.search().delete() sleep(3) will = Faculty(meta={"id": 379}, name="William.Allison", full_name="Allison, William.", faculty_id=379, email="*****@*****.**") will.save() will_keywords = Keywords( faculty_id=379, datasource="test", approach_id=0, keywords=["zebrafish", "evolutionary processes", "marine"]) will_keywords.save() vince = Faculty(meta={"id": 356}, name="Vincent.Bouchard", full_name="Bouchard, Vincent", faculty_id=356, email="*****@*****.**") vince.save() vince_keywords = Keywords( faculty_id=356, datasource="test", approach_id=0, keywords=["string theory", "number theory", "mathematics"]) vince_keywords.save() sleep(3)
def test_create__success(self): link = 'http://www.researcherid.com/rid/A-2612-2014' rid = ResearchIdPageScrape() obj = Faculty(name="Test.Prof", faculty_id=110, email="*****@*****.**") obj.researcherid = link res = rid.run(obj) print(res) assert res != None
def test_create(self): prof = Faculty() prof.name = "name" prof.email = "*****@*****.**" prof.faculty_id = 1 prof.department = "cs" assert prof.department == "cs"
def test_create__success(self): link = 'https://scholar.google.ca/citations?user=KffJRdgAAAAJ&hl=en&oi=sra' ga = GoogleScholarPageScrape() obj = Faculty(name="Test.Prof", faculty_id=110, email="*****@*****.**") obj.google_scholar = link res = ga.run(obj) print(res) assert res != None
def test_create__success(self): link = 'http://www.researcherid.com/rid/C-6729-2008' rid = ResearchIdPageScrape() obj = Faculty(name="Test.Prof", faculty_id=110, email="*****@*****.**") obj.research_id = link res = rid.is_requirement_satisfied(obj) assert res is True res = rid.run(obj) print(res) assert res is not None