From 1b7d37b50ad226b81b0d622ec09d01195c5a20c2 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 8 Nov 2022 17:37:10 +0100 Subject: [PATCH] drop register in tests --- tests/conftest.py | 2 -- tests/test_render_2_0.py | 30 +----------------------------- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 8a10cea8..8e5c52d1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -22,7 +22,6 @@ from ereuse_devicehub.devicehub import Devicehub from ereuse_devicehub.inventory.views import devices from ereuse_devicehub.labels.views import labels from ereuse_devicehub.mail.flask_mail import Mail -from ereuse_devicehub.register.views import register from ereuse_devicehub.resources.agent.models import Person from ereuse_devicehub.resources.enums import SessionType from ereuse_devicehub.resources.tag import Tag @@ -66,7 +65,6 @@ def _app(config: TestConfig) -> Devicehub: app.register_blueprint(labels) app.register_blueprint(api) app.register_blueprint(workbench) - app.register_blueprint(register) app.config["SQLALCHEMY_RECORD_QUERIES"] = True app.config['PROFILE'] = True # app.wsgi_app = ProfilerMiddleware(app.wsgi_app, restrictions=[30]) diff --git a/tests/test_render_2_0.py b/tests/test_render_2_0.py index fbc8307c..f9f82928 100644 --- a/tests/test_render_2_0.py +++ b/tests/test_render_2_0.py @@ -16,7 +16,7 @@ from ereuse_devicehub.parser.models import SnapshotsLog from ereuse_devicehub.resources.action.models import Snapshot from ereuse_devicehub.resources.device.models import Device, Placeholder from ereuse_devicehub.resources.lot.models import Lot -from ereuse_devicehub.resources.user.models import User, UserValidation +from ereuse_devicehub.resources.user.models import User from tests import conftest @@ -2604,34 +2604,6 @@ def test_snapshot_is_server_erase(user3: UserClientFlask): assert snapshot2 in snapshot.device.actions -@pytest.mark.mvp -@pytest.mark.usefixtures(conftest.app_context.__name__) -def test_new_register(user3: UserClientFlask, app: Devicehub): - uri = '/new_register/' - body, status = user3.get(uri) - assert "Create your account" in body - - data = { - 'csrf_token': generate_csrf(), - 'email': "foo@bar.cxm", - 'password': "123456", - 'password2': "123456", - 'name': "booBar", - } - body, status = user3.post(uri, data=data) - assert status == '200 OK' - assert "Please check your email." in body - - user_valid = UserValidation.query.one() - assert user_valid.user.active is False - - uri = '/validate_user/' + str(user_valid.token) - body, status = user3.get(uri) - assert status == '200 OK' - assert "You have successfully activated your account!" in body - assert user_valid.user.active - - @pytest.mark.mvp @pytest.mark.usefixtures(conftest.app_context.__name__) def test_system_uuid_motherboard(user3: UserClientFlask):