From ce001b64aa66b4779f2e5c3891c66c82f69c6727 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 11 May 2022 12:39:23 +0200 Subject: [PATCH] add test for wbsettings --- tests/test_render_2_0.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/test_render_2_0.py b/tests/test_render_2_0.py index 9a52b89f..38dc12cd 100644 --- a/tests/test_render_2_0.py +++ b/tests/test_render_2_0.py @@ -842,3 +842,27 @@ def test_action_datawipe(user3: UserClientFlask): assert dev.actions[-1].type == 'DataWipe' assert 'Action "DataWipe" created successfully!' in body assert dev.devicehub_id in body + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wb_settings(user3: UserClientFlask): + uri = '/workbench/settings/' + body, status = user3.get(uri) + + assert status == '200 OK' + assert "Download your settings for Workbench" in body + assert "Workbench Settings" in body + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wb_settings_register(user3: UserClientFlask): + uri = '/workbench/settings/?opt=register' + body, status = user3.get(uri) + + assert status == '200 OK' + assert "WB_BENCHMARK = False" in body + assert "WB_ERASE = \n" in body + assert "WB_ERASE_STEPS = 0" in body + assert "WB_ERASE_LEADING_ZEROS = False" in body