@@ -176,6 +176,37 @@ def create_login_session(self, username="admin", password="sekrit",
176176 return session
177177 return session , response
178178
179+
180+ def test_query (self ):
181+ current_user_query = (
182+ "@columns=title,id,activity,status,assignedto&"
183+ "@sort=activity&@group=priority&@filter=creator&"
184+ "@pagesize=50&@startwith=0&creator=%40current_user&"
185+ "@dispname=Test1" )
186+
187+ session , _response = self .create_login_session ()
188+ f = session .get (self .url_base ()+ '/issue?' + current_user_query )
189+
190+ # verify the query has run by looking for the query name
191+ self .assertIn ('List of issues\n - Test1' , f .text )
192+ # find title of issue 1
193+ self .assertIn ('foo bar RESULT' , f .text )
194+ # match footer "1..1 out of 1" if issue is found
195+ self .assertIn ('out of' , f .text )
196+ # logout
197+ f = session .get (self .url_base ()+ '/?@action=logout' )
198+
199+
200+ # set up for another user
201+ session , _response = self .create_login_session (username = "fred" )
202+ f = session .get (self .url_base ()+ '/issue?' + current_user_query )
203+
204+ # verify the query has run
205+ self .assertIn ('List of issues\n - Test1' , f .text )
206+ # We should have no rows, so verify the static part
207+ # of the footer is missing.
208+ self .assertNotIn ('out of' , f .text )
209+
179210 def test_start_page (self ):
180211 """ simple test that verifies that the server can serve a start page.
181212 """
0 commit comments