basic endpoint for wbconf
This commit is contained in:
parent
2115f53f54
commit
adb9a8e25a
|
@ -291,6 +291,10 @@ class InternalStatsView(DeviceView):
|
|||
output.headers['Content-type'] = 'text/csv'
|
||||
return output
|
||||
|
||||
class WbConfDocumentView(DeviceView):
|
||||
def get(self, wbtype: str):
|
||||
return jsonify('')
|
||||
|
||||
|
||||
class DocumentDef(Resource):
|
||||
__type__ = 'Document'
|
||||
|
@ -358,3 +362,9 @@ class DocumentDef(Resource):
|
|||
auth=app.auth)
|
||||
actions_view = app.auth.requires_auth(actions_view)
|
||||
self.add_url_rule('/actions/', defaults=d, view_func=actions_view, methods=get)
|
||||
|
||||
wbconf_view = ActionsDocumentView.as_view('WbConfDocumentView',
|
||||
definition=self,
|
||||
auth=app.auth)
|
||||
wbconf_view = app.auth.requires_auth(wbconf_view)
|
||||
self.add_url_rule('/wbconf/', defaults=d, view_func=wbconf_view, methods=get)
|
||||
|
|
|
@ -465,7 +465,7 @@ def test_get_document_lots(user: UserClient, user2: UserClient):
|
|||
|
||||
@pytest.mark.mvp
|
||||
def test_get_document_internal_stats(user: UserClient, user2: UserClient):
|
||||
"""Tests for get teh internal stats."""
|
||||
"""Tests for get the internal stats."""
|
||||
|
||||
# csv_str, _ = user.get(res=documents.DocumentDef.t,
|
||||
# item='internalstats/')
|
||||
|
@ -490,3 +490,10 @@ def test_get_document_internal_stats(user: UserClient, user2: UserClient):
|
|||
export_csv = list(obj_csv)
|
||||
|
||||
assert csv_str.strip() == '""'
|
||||
|
||||
@pytest.mark.mvp
|
||||
def test_get_wbconf(user: UserClient):
|
||||
"""Tests for get env file for usb wb."""
|
||||
|
||||
csv_str, _ = user.get(res=documents.DocumentDef.t,
|
||||
item='wbconf/')
|
||||
|
|
Reference in a new issue