mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	tests: Refactor away result.json() calls with helpers.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							a6e2453323
						
					
				
				
					commit
					a142fbff85
				
			@@ -2213,9 +2213,9 @@ class NormalActionsTest(BaseAction):
 | 
			
		||||
            nonlocal uri
 | 
			
		||||
            result = self.client_post("/json/user_uploads", {"file": fp})
 | 
			
		||||
 | 
			
		||||
            self.assert_json_success(result)
 | 
			
		||||
            self.assertIn("uri", result.json())
 | 
			
		||||
            uri = result.json()["uri"]
 | 
			
		||||
            response_dict = self.assert_json_success(result)
 | 
			
		||||
            self.assertIn("uri", response_dict)
 | 
			
		||||
            uri = response_dict["uri"]
 | 
			
		||||
            base = "/user_uploads/"
 | 
			
		||||
            self.assertEqual(base, uri[: len(base)])
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user