# Path: virtool/users/utils.py
# PERMISSIONS = [
#     "cancel_job",
#     "create_ref",
#     "create_sample",
#     "modify_hmm",
#     "modify_subtraction",
#     "remove_file",
#     "remove_job",
#     "upload_file",
# ]
# 
# def hash_password(password: str) -> str:
#     """
#     Salt and hash a unicode password. Uses bcrypt.
# 
#     :param password: a password string to salt and hash
#     :return: a salt and hashed password
# 
#     """
#     return bcrypt.hashpw(password.encode(), bcrypt.gensalt(12))


import pytest
from virtool.users.utils import PERMISSIONS, hash_password
        )

    elif error == "credentials_error":
        await resp_is.bad_request(resp, "Invalid credentials")

    else:
        assert resp.status == 200
        assert await resp.json() == snapshot

        assert await resp.json() == {
            "permissions": {
                "cancel_job": False,
                "create_ref": False,
                "create_sample": False,
                "modify_hmm": False,
                "modify_subtraction": False,
                "remove_file": False,
                "remove_job": False,
                "upload_file": False,
            },
            "groups": [],
            "handle": "bob",
            "administrator": False,
            "last_password_change": static_time.iso,
            "primary_group": "technician",
            "settings": {
                "skip_quick_analyze_dialog": True,
                "show_ids": True,
                "show_versions": True,
                "quick_analyze_workflow": "pathoscope_bowtie",

# Path: virtool/users/utils.py
# PERMISSIONS = [
#     "cancel_job",
#     "create_ref",
#     "create_sample",
#     "modify_hmm",
#     "modify_subtraction",
#     "remove_file",
#     "remove_job",
#     "upload_file",
# ]
# 
# def hash_password(password: str) -> str:
#     """
#     Salt and hash a unicode password. Uses bcrypt.
# 
#     :param password: a password string to salt and hash
#     :return: a salt and hashed password
# 
#     """
#     return bcrypt.hashpw(password.encode(), bcrypt.gensalt(12))


# Path: tests/account/test_api.py
import pytest
from virtool.users.utils import PERMISSIONS, hash_password

        )

    elif error == "credentials_error":
        await resp_is.bad_request(resp, "Invalid credentials")

    else:
        assert resp.status == 200
        assert await resp.json() == snapshot

        assert await resp.json() == {
            "permissions": {
                "cancel_job": False,
                "create_ref": False,
                "create_sample": False,
                "modify_hmm": False,
                "modify_subtraction": False,
                "remove_file": False,
                "remove_job": False,
                "upload_file": False,
            },
            "groups": [],
            "handle": "bob",
            "administrator": False,
            "last_password_change": static_time.iso,
            "primary_group": "technician",
            "settings": {
                "skip_quick_analyze_dialog": True,
                "show_ids": True,
                "show_versions": True,
                "quick_analyze_workflow": "pathoscope_bowtie",

            },