refactor(endpoints/api/repository*): added in pre_oci_model abstraction
this is a part of getting ready for oci stuff [TESTING->using new PR stack] Issue: https://coreosdev.atlassian.net/browse/QUAY-633 - [ ] It works! - [ ] Comments provide sufficient explanations for the next contributor - [ ] Tests cover changes and corner cases - [ ] Follows Quay syntax patterns and format
This commit is contained in:
parent
94d516a2c8
commit
9e1106f164
6 changed files with 473 additions and 221 deletions
|
@ -38,8 +38,8 @@ NOT_FOUND_RESPONSE = {
|
|||
])
|
||||
def test_post_changetrust(trust_enabled, repo_found, expected_body, expected_status, client):
|
||||
with patch('endpoints.api.repository.tuf_metadata_api') as mock_tuf:
|
||||
with patch('endpoints.api.repository.model') as mock_model:
|
||||
mock_model.repository.get_repository.return_value = MagicMock() if repo_found else None
|
||||
with patch('endpoints.api.repository_models_pre_oci.model.repository.get_repository') as mock_model:
|
||||
mock_model.return_value = MagicMock() if repo_found else None
|
||||
mock_tuf.get_default_tags_with_expiration.return_value = ['tags', 'expiration']
|
||||
with client_with_identity('devtable', client) as cl:
|
||||
params = {'repository': 'devtable/repo'}
|
||||
|
|
Reference in a new issue