@@ -53,7 +53,7 @@ def setUp(self):
5353 self ._username = "datafed89"
5454 password = os .environ .get ("DATAFED_USER89_PASSWORD" )
5555
56- self ._timeout = int (os .environ .get ('DATAFED_TEST_TIMEOUT_OVERRIDE' , '1' ));
56+ self ._timeout = int (os .environ .get ('DATAFED_TEST_TIMEOUT_OVERRIDE' , '1' ))
5757 count = 0
5858 while True :
5959 try :
@@ -147,7 +147,6 @@ def setUp(self):
147147 status = task_result [0 ].task [0 ].status
148148 count = count + 1
149149
150-
151150 parameters = {
152151 "testing_tempareture" : 900000 ,
153152 "voltage" : [1 , 2 , - 4 , 7.123 ],
@@ -158,48 +157,45 @@ def setUp(self):
158157
159158 title = "Adamantium"
160159 alias = "adamantium"
161- data_result = self ._df_api .dataCreate (
160+ self ._df_api .dataCreate (
162161 title = title ,
163162 alias = alias ,
164163 metadata = json .dumps (parameters ),
165164 tags = ["material" ],
166165 parent_id = "root" ,
167166 )
168167
169-
170-
171168 def test_query_create_delete (self ):
172169
173170 search_query = self ._df_api .queryCreate (title = "Search for Adamantium" , owner = "u/" + self ._username , coll = ["root" ], meta = "md.creator == 'Lex Luther'" )
174171
175172 print ("Search query create" )
176173 print (search_query )
177174
178- query_result = self ._df_api .queryExec (search_query [0 ].id )
175+ query_result = self ._df_api .queryExec (search_query [0 ].id )
179176
180177 material = ""
181178 for model in query_result [0 ].item :
182- if model .alias .startswith ("adamantium" ):
183- material = model .alias
179+ if model .alias .startswith ("adamantium" ):
180+ material = model .alias
184181
185182 print (f"Query found { material } " )
186183
187184 self .assertEqual (material , "adamantium" )
188185
189186 self ._df_api .queryDelete (search_query [0 ].id )
190187
191-
192188 def tearDown (self ):
193189
194- task_result = self ._df_api .dataDelete ("krpytonite " )
190+ task_result = self ._df_api .dataDelete ("adamantium " )
195191
196192 status = task_result [0 ].task [0 ].status
197193 count = 0
198194 while status < 3 :
199195 if count > 20 :
200196 break
201197 time .sleep (self ._timeout )
202- task_result = self ._df_api .taskView (task_id )
198+ task_result = self ._df_api .taskView (task_result [ 0 ]. task [ 0 ]. id )
203199 status = task_result [0 ].task [0 ].status
204200 count = count + 1
205201
0 commit comments