@@ -59,6 +59,7 @@ def test_oneshot(self):
5959 ds = list (result )
6060
6161 if self .service .splunk_version < (10 ,):
62+ # TODO: Why is this assert here?
6263 self .assertEqual (result .is_preview , False )
6364
6465 self .assertTrue (isinstance (ds [0 ], dict ) or isinstance (ds [0 ], results .Message ))
@@ -78,6 +79,7 @@ def test_export(self):
7879 ds = list (result )
7980
8081 if self .service .splunk_version < (10 ,):
82+ # TODO: Why is this assert here?
8183 self .assertEqual (result .is_preview , False )
8284
8385 self .assertTrue (isinstance (ds [0 ], dict ) or isinstance (ds [0 ], results .Message ))
@@ -101,6 +103,7 @@ def test_export_docstring_sample(self):
101103 pass # print(result)
102104
103105 if self .service .splunk_version < (10 ,):
106+ # TODO: Why is this assert here?
104107 self .assertFalse (rr .is_preview )
105108
106109 def test_results_docstring_sample (self ):
@@ -120,11 +123,11 @@ def test_results_docstring_sample(self):
120123 pass # print(result)
121124
122125 if self .service .splunk_version < (10 ,):
126+ # TODO: Why is this assert here?
123127 self .assertFalse (rr .is_preview )
124128
125129 def test_preview_docstring_sample (self ):
126- from splunklib import client
127- from splunklib import results
130+ from splunklib import client , results
128131
129132 service = self .service # cheat
130133 job = service .jobs .create ("search * | head 5" )
@@ -137,12 +140,6 @@ def test_preview_docstring_sample(self):
137140 # Normal events are returned as dicts
138141 pass # print(result)
139142
140- if self .service .splunk_version < (10 ,):
141- if rr .is_preview :
142- pass # print("Preview of a running search job.")
143- else :
144- pass # print("Job is finished. Results are final.")
145-
146143 def test_oneshot_docstring_sample (self ):
147144 from splunklib import results
148145
@@ -159,6 +156,7 @@ def test_oneshot_docstring_sample(self):
159156 pass # print(result)
160157
161158 if self .service .splunk_version < (10 ,):
159+ # TODO: Why is this assert here?
162160 self .assertFalse (rr .is_preview )
163161
164162 def test_normal_job_with_garbage_fails (self ):
0 commit comments