This repository was archived by the owner on Aug 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-14
lines changed
Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -463,22 +463,14 @@ def test_get_item_key_slice_using_start_stop(self):
463463 def test_get_item_key_slice_start_greater_than_stop (self ):
464464 """
465465 Test getting a key slice by using start value greater than stop value.
466- The behavior when using CouchDB is to return an HTTP 400 Bad Request
467- error whereas with Cloudant an empty result collection is returned.
468- Unfortunately a 400 response cannot definitively be attributed to a
469- startkey value being greater than an endkey value so the decision to
470- leave this CouchDB/Cloudant behavior inconsistency as is. We have an
471- "if-else" branch as part of the test to handle the two differing
472- behaviors.
466+ The behavior when using CouchDB and newer versions of Cloudant
467+ is to return an HTTP 400 Bad Request.
473468 """
474469 result = Result (self .view001 )
475- if os .environ .get ('RUN_CLOUDANT_TESTS' ) is None :
476- with self .assertRaises (HTTPError ) as cm :
477- invalid_result = result ['foo' : 'bar' ]
478- self .assertTrue (
479- str (cm .exception ).startswith ('400 Client Error: Bad Request' ))
480- else :
481- self .assertEqual (result ['foo' : 'bar' ], [])
470+ with self .assertRaises (HTTPError ) as cm :
471+ invalid_result = result ['foo' : 'bar' ]
472+ self .assertTrue (
473+ str (cm .exception ).startswith ('400 Client Error: Bad Request' ))
482474
483475 def test_get_item_key_slice_using_start_only (self ):
484476 """
You can’t perform that action at this time.
0 commit comments