Update tests
This commit is contained in:
parent
9515f18fb6
commit
1a78722521
6 changed files with 54 additions and 42 deletions
|
@ -74,7 +74,6 @@ from endpoints.api.superuser import (SuperUserLogs, SuperUserList, SuperUserMana
|
|||
SuperUserCustomCertificates, SuperUserCustomCertificate)
|
||||
from endpoints.api.globalmessages import (GlobalUserMessage, GlobalUserMessages,)
|
||||
from endpoints.api.secscan import RepositoryImageSecurity, RepositoryManifestSecurity
|
||||
from endpoints.api.signing import RepositorySignatures
|
||||
from endpoints.api.suconfig import (SuperUserRegistryStatus, SuperUserConfig, SuperUserConfigFile,
|
||||
SuperUserCreateInitialSuperUser)
|
||||
from endpoints.api.manifest import RepositoryManifestLabels, ManageRepositoryManifestLabel
|
||||
|
@ -4507,29 +4506,6 @@ class TestRepositoryImageSecurity(ApiTestCase):
|
|||
expected_code=200)
|
||||
|
||||
|
||||
class TestRepositorySignatures(ApiTestCase):
|
||||
def test_get_signatures(self):
|
||||
self.login(ADMIN_ACCESS_USER)
|
||||
|
||||
targets = {
|
||||
'latest': {
|
||||
'hashes': {
|
||||
'sha256': 'mLmxwTyUrqIRDaz8uaBapfrp3GPERfsDg2kiMujlteo='
|
||||
},
|
||||
'length': 1500
|
||||
},
|
||||
'test_tag': {
|
||||
'hashes': {
|
||||
'sha256': '1234123'
|
||||
},
|
||||
'length': 50
|
||||
}
|
||||
}
|
||||
|
||||
with patch('app.tuf_metadata_api') as mock_tuf:
|
||||
mock_tuf.get_default_tags.return_value = targets
|
||||
signed_tags_response = self.getJsonResponse(RepositorySignatures, params=dict(namespace='ns', repository='repo'))
|
||||
self.assertEquals(signed_tags_response, {'tags': ['latest', 'test_tag']})
|
||||
|
||||
|
||||
class TestSuperUserCustomCertificates(ApiTestCase):
|
||||
|
|
Reference in a new issue