jenkins-bot has submitted this change and it was merged.
Change subject: Add online project scrape test
......................................................................
Add online project scrape test
Change-Id: Idc112f9397ac2f2fcfe51ca60259b257dff86e91
---
M tests/test_wikibugs2.py
1 file changed, 11 insertions(+), 2 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/test_wikibugs2.py b/tests/test_wikibugs2.py
index 5e27d9f..2db1b0c 100644
--- a/tests/test_wikibugs2.py
+++ b/tests/test_wikibugs2.py
@@ -1,7 +1,9 @@
+# encoding: utf-8
import wikibugs
import configfetcher
import unittest
import os
+import requests
p = os.path.split(__file__)[0]
@@ -12,8 +14,7 @@
configfetcher.ConfigFetcher()
)
- def test_offline_scrape(self):
- content = open(p + "/T87834", encoding="utf-8").read()
+ def run_scrape(self, content):
tags = self.bugs.get_tags(content)
self.assertSetEqual(set(tags), {
'ยง Fundraising Sprint Devo',
@@ -27,3 +28,11 @@
'uri',
'tagtype'
})
+
+ def test_offline_scrape(self):
+ content = open(p + "/T87834", encoding="utf-8").read()
+ self.run_scrape(content)
+
+ def test_online_scrape(self):
+ content = requests.get('https://phabricator.wikimedia.org/T87834').text
+ self.run_scrape(content)
--
To view, visit https://gerrit.wikimedia.org/r/189051
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idc112f9397ac2f2fcfe51ca60259b257dff86e91
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/wikibugs2
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits