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'
|
output.headers['Content-type'] = 'text/csv'
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
class WbConfDocumentView(DeviceView):
|
||||||
|
def get(self, wbtype: str):
|
||||||
|
return jsonify('')
|
||||||
|
|
||||||
|
|
||||||
class DocumentDef(Resource):
|
class DocumentDef(Resource):
|
||||||
__type__ = 'Document'
|
__type__ = 'Document'
|
||||||
|
@ -358,3 +362,9 @@ class DocumentDef(Resource):
|
||||||
auth=app.auth)
|
auth=app.auth)
|
||||||
actions_view = app.auth.requires_auth(actions_view)
|
actions_view = app.auth.requires_auth(actions_view)
|
||||||
self.add_url_rule('/actions/', defaults=d, view_func=actions_view, methods=get)
|
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
|
@pytest.mark.mvp
|
||||||
def test_get_document_internal_stats(user: UserClient, user2: UserClient):
|
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,
|
# csv_str, _ = user.get(res=documents.DocumentDef.t,
|
||||||
# item='internalstats/')
|
# item='internalstats/')
|
||||||
|
@ -490,3 +490,10 @@ def test_get_document_internal_stats(user: UserClient, user2: UserClient):
|
||||||
export_csv = list(obj_csv)
|
export_csv = list(obj_csv)
|
||||||
|
|
||||||
assert csv_str.strip() == '""'
|
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 New Issue