prefetch related source credentials in tasks.py

This commit is contained in:
Ryan Petrello
2019-02-28 11:45:45 -05:00
committed by Jake McDermott
parent 42f4956a7f
commit 81a509424a
2 changed files with 5 additions and 4 deletions

View File

@@ -700,7 +700,8 @@ class TestJobCredentials(TestJobExecution):
__iter__ = lambda *args: iter(job._credentials),
first = lambda: job._credentials[0]
),
'spec_set': ['all', 'add', 'filter']
'prefetch_related': lambda _: credentials_mock,
'spec_set': ['all', 'add', 'filter', 'prefetch_related'],
})
with mock.patch.object(UnifiedJob, 'credentials', credentials_mock):