File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed
Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 11"orders" database created.
2- You have created the document:
2+ You have created the document. Response body :
33{
4- "_id": "example",
5- "name": "Bob Smith",
6- "joined": "2019-01-24T10:42:59.000Z",
4+ "ok": true,
5+ "id": "example",
76 "rev": "1-1b403633540686aa32d013fda9041a5d"
87}
Original file line number Diff line number Diff line change 1414# See the License for the specific language governing permissions and
1515# limitations under the License.
1616
17+ import json
18+
1719from ibm_cloud_sdk_core import ApiException
1820from ibmcloudant .cloudant_v1 import CloudantV1 , Document
1921
6567"""
6668# =====================================================================
6769
68- # Keeping track of the revision number of the document object
69- # is necessary for further UPDATE/DELETE operations:
70- example_document .rev = create_document_response ["rev" ]
71- print (f'You have created the document:\n { example_document } ' )
70+ response_body = json .dumps (create_document_response , indent = 2 )
71+ print (f'You have created the document. Response body:\n { response_body } ' )
Original file line number Diff line number Diff line change 1919import subprocess
2020import sys
2121import os
22+ import requests
2223from pathlib import Path
2324
2425parent_dir = Path (__file__ ).resolve ().parent .parent
@@ -30,10 +31,9 @@ class TestReadmeExamples(unittest.TestCase):
3031 def setUpClass (cls ):
3132 """Set up test environment before all tests"""
3233 # Get WireMock URL from environment
33- wiremock_url = os .environ .get ('WIREMOCK_URL' )
34+ wiremock_url = os .environ .get ('WIREMOCK_URL' , "http://localhost:8080" )
3435
3536 # Reset WireMock scenarios
36- import requests
3737 requests .post (f"{ wiremock_url } /__admin/scenarios/reset" )
3838
3939 # Set authentication environment variables
You can’t perform that action at this time.
0 commit comments