refactor(util/tufmetadata/test): move app test to gc suite
This commit is contained in:
parent
2a20807e8a
commit
ccca0c9655
2 changed files with 8 additions and 11 deletions
|
@ -6,8 +6,7 @@ from flask import Flask
|
|||
|
||||
from test import testconfig
|
||||
from test.fixtures import init_db_path
|
||||
from util.tufmetadata import api
|
||||
from data import model
|
||||
from util.tufmetadata import api
|
||||
|
||||
|
||||
valid_response = {
|
||||
|
@ -247,12 +246,3 @@ def test_delete_metadata_exception(response_code, exception):
|
|||
tuf_api = api.TUFMetadataAPI(app, app.config, client=client)
|
||||
response = tuf_api.delete_metadata('quay', 'quay')
|
||||
assert response == False
|
||||
|
||||
|
||||
def test_purge_repo(init_db_path):
|
||||
app = Flask(__name__)
|
||||
app.config.from_object(testconfig.TestConfig())
|
||||
app.config["DB_URI"] = init_db_path
|
||||
with patch('app.tuf_metadata_api') as mock_tuf:
|
||||
model.repository.purge_repository("ns", "repo")
|
||||
assert mock_tuf.delete_metadata.called_with("ns", "repo")
|
Reference in a new issue