File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
system/test_apps/modularinput_app/bin Expand file tree Collapse file tree 3 files changed +15
-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 1717from io import BytesIO
1818from pathlib import Path
1919from time import sleep
20+ from datetime import datetime
2021
2122import io
2223
@@ -438,6 +439,17 @@ def test_v1_job_fallback(self):
438439 self .assertTrue (client .PATH_JOBS_V2 in self .job .path )
439440 self .assertEqual (n_events , n_preview , n_results )
440441
442+ def test_published_author_fields (self ):
443+ jobs = self .service .jobs .list (name = self .job .name )
444+ self .assertEqual (len (jobs ), 1 )
445+ self .assertEqual (jobs [0 ].state .author .name , self .service .username )
446+ self .assertIsNotNone (jobs [0 ].state .published )
447+ datetime .fromisoformat (jobs [0 ].state .published ) # make sure it is parsable
448+
449+ self .assertEqual (self .job .state .author .name , self .service .username )
450+ self .assertIsNotNone (self .job .state .published )
451+ datetime .fromisoformat (self .job .state .published ) # make sure it is parsable
452+
441453
442454if __name__ == "__main__" :
443455 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