fixing test base

This commit is contained in:
Cayo Puigdefabregas 2021-01-18 12:40:31 +01:00
parent 3b2f09a37c
commit 1ec1eb39bf
2 changed files with 13 additions and 0 deletions

View File

@ -231,6 +231,15 @@ class CheckView(View):
return jsonify(result) return jsonify(result)
class StampsView(View):
"""
This view render one public ans static page for see the links for to do the check
of one csv file
"""
def get(self):
return flask.render_template('documents/stamp.html')
class DocumentDef(Resource): class DocumentDef(Resource):
__type__ = 'Document' __type__ = 'Document'
SCHEMA = None SCHEMA = None
@ -283,6 +292,9 @@ class DocumentDef(Resource):
check_view = CheckView.as_view('CheckView', definition=self, auth=app.auth) check_view = CheckView.as_view('CheckView', definition=self, auth=app.auth)
self.add_url_rule('/check/', defaults={}, view_func=check_view, methods=get) self.add_url_rule('/check/', defaults={}, view_func=check_view, methods=get)
stamps_view = StampsView.as_view('StampsView', definition=self, auth=app.auth)
self.add_url_rule('/stamps/', defaults={}, view_func=stamps_view, methods=get)
actions_view = ActionsDocumentView.as_view('ActionsDocumentView', actions_view = ActionsDocumentView.as_view('ActionsDocumentView',
definition=self, definition=self,
auth=app.auth) auth=app.auth)

View File

@ -55,6 +55,7 @@ def test_api_docs(client: Client):
'/documents/static/{filename}', '/documents/static/{filename}',
'/documents/stock/', '/documents/stock/',
'/documents/check/', '/documents/check/',
'/documents/stamps/',
'/drills/{dev1_id}/merge/{dev2_id}', '/drills/{dev1_id}/merge/{dev2_id}',
'/graphic-cards/{dev1_id}/merge/{dev2_id}', '/graphic-cards/{dev1_id}/merge/{dev2_id}',
'/hard-drives/{dev1_id}/merge/{dev2_id}', '/hard-drives/{dev1_id}/merge/{dev2_id}',