@@ -160,16 +160,24 @@ def test_history_sidebar_expired_store_id(self):
160160
161161 def test_history_refresh (self ):
162162 """Verify refresh history response has request variables."""
163- data = {"foo" : "bar" }
164- self .client .get ("/json_view/" , data , content_type = "application/json" )
165- data = {"store_id" : "foo" }
166- response = self .client .get (reverse ("djdt:history_refresh" ), data = data )
163+ self .client .get ("/json_view/" , {"foo" : "bar" }, content_type = "application/json" )
164+ self .client .get (
165+ "/json_view/" , {"spam" : "eggs" }, content_type = "application/json"
166+ )
167+
168+ response = self .client .get (
169+ reverse ("djdt:history_refresh" ), data = {"store_id" : "foo" }
170+ )
167171 self .assertEqual (response .status_code , 200 )
168172 data = response .json ()
169- self .assertEqual (len (data ["requests" ]), 1 )
173+ self .assertEqual (len (data ["requests" ]), 2 )
170174
171- store_id = list (DebugToolbar ._store )[0 ]
172- self .assertIn (html .escape (store_id ), data ["requests" ][0 ]["content" ])
175+ store_ids = list (DebugToolbar ._store )
176+ self .assertIn (html .escape (store_ids [0 ]), data ["requests" ][0 ]["content" ])
177+ self .assertIn (html .escape (store_ids [1 ]), data ["requests" ][1 ]["content" ])
173178
174179 for val in ["foo" , "bar" ]:
175180 self .assertIn (val , data ["requests" ][0 ]["content" ])
181+
182+ for val in ["spam" , "eggs" ]:
183+ self .assertIn (val , data ["requests" ][1 ]["content" ])
0 commit comments