jenkins-bot has submitted this change and it was merged.

Change subject: Rename TestContainer to Container
......................................................................


Rename TestContainer to Container

The automatic test discovery will try to run the tests in
any class that starts with test. The TestContainer class
does not contain any tests and should therefore be just
called Container to increase the compatibility with
pytest.

Change-Id: Ia76cbdeb4591e6f8b65e03e0928ab793e7b6e2fb
---
M tests/sparql_tests.py
1 file changed, 6 insertions(+), 6 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/sparql_tests.py b/tests/sparql_tests.py
index f7c2f5c..d86368e 100644
--- a/tests/sparql_tests.py
+++ b/tests/sparql_tests.py
@@ -74,7 +74,7 @@
 """
 
 
-class TestContainer(object):
+class Container(object):
     """Simple test container for return values."""
 
     def __init__(self, value):
@@ -90,7 +90,7 @@
     @patch.object(sparql.http, 'fetch')
     def testQuerySelect(self, mock_method):
         """Test SELECT query."""
-        mock_method.return_value = TestContainer(SQL_RESPONSE)
+        mock_method.return_value = Container(SQL_RESPONSE)
         q = sparql.SparqlQuery()
         res = q.select('SELECT * WHERE { ?x ?y ?z }')
         self.assertIsInstance(res, list, 'Result is not a list')
@@ -108,7 +108,7 @@
     @patch.object(sparql.http, 'fetch')
     def testQuerySelectFull(self, mock_method):
         """Test SELECT query with full data."""
-        mock_method.return_value = TestContainer(SQL_RESPONSE)
+        mock_method.return_value = Container(SQL_RESPONSE)
         q = sparql.SparqlQuery()
         res = q.select('SELECT * WHERE { ?x ?y ?z }', full_data=True)
         self.assertIsInstance(res, list, 'Result is not a list')
@@ -130,7 +130,7 @@
     @patch.object(sparql.http, 'fetch')
     def testGetItems(self, mock_method):
         """Test item list retrieval via SPARQL."""
-        mock_method.return_value = TestContainer(SQL_RESPONSE)
+        mock_method.return_value = Container(SQL_RESPONSE)
         q = sparql.SparqlQuery()
         res = q.get_items('SELECT * WHERE { ?x ?y ?z }', 'cat')
         self.assertSetEqual(res, set(['Q498787', 'Q677525']))
@@ -138,13 +138,13 @@
     @patch.object(sparql.http, 'fetch')
     def testQueryAsk(self, mock_method):
         """Test ASK query."""
-        mock_method.return_value = TestContainer(RESPONSE_TRUE)
+        mock_method.return_value = Container(RESPONSE_TRUE)
         q = sparql.SparqlQuery()
 
         res = q.ask('ASK { ?x ?y ?z }')
         self.assertTrue(res)
 
-        mock_method.return_value = TestContainer(RESPONSE_FALSE)
+        mock_method.return_value = Container(RESPONSE_FALSE)
         res = q.ask('ASK { ?x ?y ?z }')
         self.assertFalse(res)
 

-- 
To view, visit https://gerrit.wikimedia.org/r/296818
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia76cbdeb4591e6f8b65e03e0928ab793e7b6e2fb
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Tobias47n9e <tobias47...@gmail.com>
Gerrit-Reviewer: John Vandenberg <jay...@gmail.com>
Gerrit-Reviewer: Xqt <i...@gno.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to