File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
lib_common/src/d1_common/tests Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ def error_404(request, exception):
8383 Note: Cannot raise NotFound() here, as this method is not covered by the GMN
8484 middleware handler that catches DataONE exceptions raised by normal views.
8585 """
86- return django .http .HttpResponse (
86+ return django .http .HttpResponseNotFound (
8787 d1_common .types .exceptions .NotFound (
8888 0 ,
8989 'Invalid API endpoint' ,
@@ -96,7 +96,7 @@ def error_404(request, exception):
9696
9797
9898def error_500 (request ):
99- return django .http .HttpResponse (
99+ return django .http .HttpResponseServerError (
100100 d1_common .types .exceptions .ServiceFailure (
101101 0 ,
102102 'Internal error' ,
Original file line number Diff line number Diff line change @@ -152,8 +152,8 @@ def test_1120(self):
152152 xml .replace_by_etree (new_replication_policy_el )
153153 assert len (xml .get_element_list_by_name ('preferredMemberNode' )) == 1
154154 assert len (xml .get_element_list_by_name ('blockedMemberNode' )) == 1
155- assert xml .get_element ('replicationPolicy' ).attrib ['a' ] == 'b'
156- assert xml .get_element ('replicationPolicy' ).attrib ['c' ] == 'd'
155+ assert xml .get_element_by_name ('replicationPolicy' ).attrib ['a' ] == 'b'
156+ assert xml .get_element_by_name ('replicationPolicy' ).attrib ['c' ] == 'd'
157157 d1_test .sample .assert_equals (xml .get_xml (), 'replace_by_etree' )
158158
159159 def test_1130 (self ):
You can’t perform that action at this time.
0 commit comments