File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -816,19 +816,22 @@ def setUp(self):
816816 self .url = reverse ("advisory-codefix-list" )
817817
818818 def test_list_all_codefixes (self ):
819- response = self .client .get (self .url )
819+ with self .assertNumQueries (10 ):
820+ response = self .client .get (self .url )
820821 assert response .status_code == status .HTTP_200_OK
821822 assert response .data ["count" ] == 1
822823 assert response .data ["results" ][0 ]["affected_advisory_id" ] == self .advisory .avid
823824
824825 def test_filter_codefix_by_advisory_id_success (self ):
825- response = self .client .get (self .url , {"advisory_id" : self .advisory .avid })
826+ with self .assertNumQueries (10 ):
827+ response = self .client .get (self .url , {"advisory_id" : self .advisory .avid })
826828 assert response .status_code == status .HTTP_200_OK
827829 assert response .data ["count" ] == 1
828830 assert response .data ["results" ][0 ]["affected_advisory_id" ] == self .advisory .avid
829831
830832 def test_filter_codefix_by_advisory_id_not_found (self ):
831- response = self .client .get (self .url , {"advisory_id" : "nonexistent/ADVISORY-ID" })
833+ with self .assertNumQueries (6 ):
834+ response = self .client .get (self .url , {"advisory_id" : "nonexistent/ADVISORY-ID" })
832835 assert response .status_code == status .HTTP_200_OK
833836 assert response .data ["count" ] == 0
834837
You can’t perform that action at this time.
0 commit comments