Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tests/integration/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,21 @@ def test_v1_job_fallback(self):
self.assertEqual(n_events, n_preview, n_results)

def test_published_author_fields(self):
def has_author():
jobs = self.service.jobs.list(name=self.job.name)
return (
len(jobs) == 1
and jobs[0].state.author is not None
and jobs[0].state.author.name is not None
)

# It takes a while until the author field becomes available after
# creaton of a job, wait until it is available, before running the asserts.
self.assertEventuallyTrue(
has_author,
timeout=5,
)

jobs = self.service.jobs.list(name=self.job.name)
self.assertEqual(len(jobs), 1)
self.assertEqual(jobs[0].state.author.name, self.service.username)
Expand Down