File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,11 +46,13 @@ def test_api_top_level(self):
4646
4747 def _assertCallbackReturnsSameJSON (self , api_url , json_dict ):
4848 cbclient = Client (Accept = 'text/javascript' )
49- identity = lambda x : x
49+ identity = lambda x : x # pyflakes:ignore
50+
5051 # To be able to eval JSON, we need to have three more symbols
51- true = True
52- false = False
53- null = None
52+ # They are used indirectly
53+ true = True # pyflakes:ignore
54+ false = False # pyflakes:ignore
55+ null = None # pyflakes:ignore
5456 r = cbclient .get (api_url + '?callback=identity' )
5557 code = compile (r .content , '<string>' , 'eval' )
5658 # Make sure it is just a call with the identity function
@@ -86,9 +88,8 @@ def test_all_model_resources_exist(self):
8688 "There doesn't seem to be any API resource for model %s.models.%s" % (app .__name__ ,model .__name__ ,))
8789
8890 def test_invalid_jsonp_callback_value (self ):
89- cbclient = Client (Accept = 'text/javascript' )
9091 try :
91- r = cbclient .get ("/api/v1?callback=$.23" )
92+ Client ( Accept = 'text/javascript' ) .get ("/api/v1?callback=$.23" )
9293 except BadRequest :
9394 return
9495 self .assertTrue (False ,
You can’t perform that action at this time.
0 commit comments