File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
system/test_apps/modularinput_app/bin Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -279,6 +279,8 @@ def _parse_atom_entry(entry):
279279 "fields" : metadata .fields ,
280280 "content" : content ,
281281 "updated" : entry .get ("updated" ),
282+ "published" : entry .get ("published" ),
283+ "author" : entry .get ("author" ),
282284 }
283285 )
284286
Original file line number Diff line number Diff line change 1515# under the License.
1616
1717from io import BytesIO
18+ import logging
1819from pathlib import Path
1920from time import sleep
21+ from datetime import datetime
2022
2123import io
2224
@@ -438,6 +440,19 @@ def test_v1_job_fallback(self):
438440 self .assertTrue (client .PATH_JOBS_V2 in self .job .path )
439441 self .assertEqual (n_events , n_preview , n_results )
440442
443+ def test_published_author_fields (self ):
444+ logging .basicConfig (force = True , level = logging .DEBUG )
445+
446+ jobs = self .service .jobs .list (name = self .job .name )
447+ self .assertEqual (len (jobs ), 1 )
448+ self .assertEqual (jobs [0 ].state .author .name , self .service .username )
449+ self .assertIsNotNone (jobs [0 ].state .published )
450+ datetime .fromisoformat (jobs [0 ].state .published ) # make sure it is parsable
451+
452+ self .assertEqual (self .job .state .author .name , self .service .username )
453+ self .assertIsNotNone (self .job .state .published )
454+ datetime .fromisoformat (self .job .state .published ) # make sure it is parsable
455+
441456
442457if __name__ == "__main__" :
443458 unittest .main ()
Original file line number Diff line number Diff line change 2222
2323class ModularInput (Script ):
2424 """
25- This app provides an example of a modular input that
25+ This app provides an example of a modular input that
2626 can be used in Settings => Data inputs => Local inputs => modularinput
2727 """
2828
You can’t perform that action at this time.
0 commit comments