Пример #1
0
 def test_02_bmj_supports_fail(self):
     bmj = BMJPlugin()
     test_urls = ["http://www.plosone.org/", "www.biomedcentral.com", "askjdfsakjdhfsa",
                     "https://www.biology.oxfordjournals.org/jsafkjsaf"]
     for url in test_urls:
         assert not bmj.supports({"url" : [url]})
Пример #2
0
 def test_02_supports_fail(self):
     p = MyPlugin()
     for url in UNSUPPORTED_URLS:
         assert not p.supports({"url" : [url]}), "Failed with URL " + url
Пример #3
0
 def test_01_bmj_supports_success(self):
     bmj = BMJPlugin()
     test_urls = ["http://www.bmj.com/content/345/bmj.e8050", 
     			 "http://gut.bmj.com/content/early/2013/08/20/gutjnl-2013-305008"]
     for url in test_urls:
         assert bmj.supports({"url" : [url]}), 'Failed url: ' + url
Пример #4
0
 def test_01_supports_success(self):
     p = MyPlugin()
     for url in SUPPORTED_URLS:
         assert p.supports({"url" : [url]})