File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,8 +50,9 @@ def fetch_input_url(cls):
5050 def read_data_from_file (cls ):
5151 filename = input ("Enter a filename (response_data.json)" )
5252 data = {}
53- if len (filename .trim ()) == 0 :
54- print ("filename empty, so default file (response_data.json) is used " )
53+ if filename == "" :
54+ filename = "response_data.json"
55+ print (f"filename empty, so default file { filename } is used " )
5556 with open (filename , "r" ) as reader :
5657 file_content = reader .read ()
5758 try :
@@ -65,9 +66,10 @@ def read_data_from_file(cls):
6566
6667 @classmethod
6768 def enter_data_payload (cls ):
68- store = int (input ("Please choose the below options? (1/2/3)" ))
6969 print ("Option 1: For sending data payload from terminal\n " )
7070 print ("Option 2: For sending data payload by reading from json file\n " )
71+ store = int (input ("Please choose the above options? (1/2)" ))
72+
7173 data = {}
7274 if store == 1 :
7375 data = input ("Enter data as key value pairs" )
You can’t perform that action at this time.
0 commit comments