File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -214,13 +214,20 @@ def projects_testing_project_global_firewalls_some_other_firewall():
214214def projects_testing_project_global_firewalls ():
215215 return render_template ('route_35_template.json' ), 200 , {'Content-Type' : 'application/json' }
216216
217- @ app . route ( '/projects/changing-project/global/firewalls' , methods = [ 'GET' ])
218- def projects_changing_project_global_firewalls ():
219- return render_template ( 'route_36_template.json' ), 200 , { 'Content-Type' : 'application/json' }
217+
218+ # Initialize a counter to track the number of calls
219+ call_counter = { "firewalls" : 0 }
220220
221221@app .route ('/projects/changing-project/global/firewalls' , methods = ['GET' ])
222- def projects_changing_project_global_firewalls_02 (): # had to manually rename
223- return render_template ('route_37_template.json' ), 200 , {'Content-Type' : 'application/json' }
222+ def firewalls ():
223+ # Increment the call counter
224+ call_counter ["firewalls" ] += 1
225+
226+ # Determine the response based on the call count
227+ if call_counter ["firewalls" ] <= 2 :
228+ return render_template ('route_36_template.json' ), 200 , {'Content-Type' : 'application/json' }
229+ else :
230+ return render_template ('route_37_template.json' ), 200 , {'Content-Type' : 'application/json' }
224231
225232if __name__ == '__main__' :
226233 app .run (debug = True )
You can’t perform that action at this time.
0 commit comments