drop register in tests
This commit is contained in:
parent
4df33e8808
commit
1b7d37b50a
|
@ -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])
|
||||
|
|
|
@ -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):
|
||||
|
|
Reference in New Issue