Use settings so that pytest is happy 🤷♂️
This commit is contained in:
parent
8af955f794
commit
fa22f52bc7
|
|
@ -353,17 +353,9 @@ packaging==24.1
|
||||||
# msal-extensions
|
# msal-extensions
|
||||||
# pytest
|
# pytest
|
||||||
# pytest-sugar
|
# pytest-sugar
|
||||||
<<<<<<< HEAD
|
|
||||||
paramiko==3.3.1
|
|
||||||
# via
|
|
||||||
# -r requirements.in
|
|
||||||
# sftpserver
|
|
||||||
parso==0.8.3
|
|
||||||
=======
|
|
||||||
paramiko==3.4.0
|
paramiko==3.4.0
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
parso==0.8.4
|
parso==0.8.4
|
||||||
>>>>>>> 9e6b9a1e (wip: Add KC-client and basic methods, signal handler)
|
|
||||||
# via jedi
|
# via jedi
|
||||||
pathspec==0.12.1
|
pathspec==0.12.1
|
||||||
# via
|
# via
|
||||||
|
|
@ -416,15 +408,10 @@ pyflakes==3.2.0
|
||||||
pygments==2.18.0
|
pygments==2.18.0
|
||||||
# via ipython
|
# via ipython
|
||||||
pyjwt[crypto]==2.8.0
|
pyjwt[crypto]==2.8.0
|
||||||
<<<<<<< HEAD
|
|
||||||
# via msal
|
|
||||||
pylint==2.17.5
|
|
||||||
=======
|
|
||||||
# via
|
# via
|
||||||
# msal
|
# msal
|
||||||
# pyjwt
|
# pyjwt
|
||||||
pylint==3.2.3
|
pylint==3.2.3
|
||||||
>>>>>>> 9e6b9a1e (wip: Add KC-client and basic methods, signal handler)
|
|
||||||
# via
|
# via
|
||||||
# pylint-django
|
# pylint-django
|
||||||
# pylint-plugin-utils
|
# pylint-plugin-utils
|
||||||
|
|
@ -447,13 +434,8 @@ pytest==8.2.2
|
||||||
# pytest-xdist
|
# pytest-xdist
|
||||||
pytest-django==4.8.0
|
pytest-django==4.8.0
|
||||||
# via -r requirements-dev.in
|
# via -r requirements-dev.in
|
||||||
<<<<<<< HEAD
|
|
||||||
pytest-order==1.2.1
|
pytest-order==1.2.1
|
||||||
# via -r requirements-dev.in
|
# via -r requirements-dev.in
|
||||||
pytest-sugar==0.9.7
|
|
||||||
=======
|
|
||||||
pytest-sugar==1.0.0
|
|
||||||
>>>>>>> 9e6b9a1e (wip: Add KC-client and basic methods, signal handler)
|
|
||||||
# via -r requirements-dev.in
|
# via -r requirements-dev.in
|
||||||
pytest-xdist==3.6.1
|
pytest-xdist==3.6.1
|
||||||
# via -r requirements-dev.in
|
# via -r requirements-dev.in
|
||||||
|
|
@ -647,17 +629,11 @@ wagtail-headless-preview==0.8.0
|
||||||
# via wagtail-grapple
|
# via wagtail-grapple
|
||||||
wagtail-localize==1.9
|
wagtail-localize==1.9
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
<<<<<<< HEAD
|
|
||||||
watchfiles==0.19.0
|
|
||||||
# via uvicorn
|
|
||||||
wcwidth==0.2.6
|
|
||||||
=======
|
|
||||||
watchfiles==0.22.0
|
watchfiles==0.22.0
|
||||||
# via
|
# via
|
||||||
# django-watchfiles
|
# django-watchfiles
|
||||||
# uvicorn
|
# uvicorn
|
||||||
wcwidth==0.2.13
|
wcwidth==0.2.13
|
||||||
>>>>>>> 9e6b9a1e (wip: Add KC-client and basic methods, signal handler)
|
|
||||||
# via prompt-toolkit
|
# via prompt-toolkit
|
||||||
webencodings==0.5.1
|
webencodings==0.5.1
|
||||||
# via html5lib
|
# via html5lib
|
||||||
|
|
@ -667,17 +643,10 @@ wheel==0.43.0
|
||||||
# via pip-tools
|
# via pip-tools
|
||||||
whitenoise[brotli]==6.6.0
|
whitenoise[brotli]==6.6.0
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
<<<<<<< HEAD
|
|
||||||
willow[heif]==1.6.1
|
|
||||||
# via wagtail
|
|
||||||
wrapt==1.15.0
|
|
||||||
# via astroid
|
|
||||||
=======
|
|
||||||
willow[heif]==1.6.3
|
willow[heif]==1.6.3
|
||||||
# via
|
# via
|
||||||
# wagtail
|
# wagtail
|
||||||
# willow
|
# willow
|
||||||
>>>>>>> 9e6b9a1e (wip: Add KC-client and basic methods, signal handler)
|
|
||||||
|
|
||||||
# The following packages are considered to be unsafe in a requirements file:
|
# The following packages are considered to be unsafe in a requirements file:
|
||||||
# pip
|
# pip
|
||||||
|
|
|
||||||
|
|
@ -75,9 +75,11 @@ def create_customer_xml(checkout_information: CheckoutInformation):
|
||||||
abacus_debitor_number=customer.abacus_debitor_number,
|
abacus_debitor_number=customer.abacus_debitor_number,
|
||||||
last_name=checkout_information.last_name,
|
last_name=checkout_information.last_name,
|
||||||
first_name=checkout_information.first_name,
|
first_name=checkout_information.first_name,
|
||||||
company_name=checkout_information.organisation_detail_name
|
company_name=(
|
||||||
if checkout_information.invoice_address == "org"
|
checkout_information.organisation_detail_name
|
||||||
else "",
|
if checkout_information.invoice_address == "org"
|
||||||
|
else ""
|
||||||
|
),
|
||||||
street=(
|
street=(
|
||||||
checkout_information.organisation_street
|
checkout_information.organisation_street
|
||||||
if checkout_information.invoice_address == "org"
|
if checkout_information.invoice_address == "org"
|
||||||
|
|
@ -145,14 +147,14 @@ def render_invoice_xml(
|
||||||
SubElement(sales_order_header_fields, "PaymentCode").text = "9999"
|
SubElement(sales_order_header_fields, "PaymentCode").text = "9999"
|
||||||
|
|
||||||
# Skender: Bestellzeitpunkt
|
# Skender: Bestellzeitpunkt
|
||||||
SubElement(
|
SubElement(sales_order_header_fields, "PurchaseOrderDate").text = (
|
||||||
sales_order_header_fields, "PurchaseOrderDate"
|
order_date.isoformat()
|
||||||
).text = order_date.isoformat()
|
)
|
||||||
|
|
||||||
# Skender: ePayment: TRANSACTION-ID von Datatrans in Bestellreferenz
|
# Skender: ePayment: TRANSACTION-ID von Datatrans in Bestellreferenz
|
||||||
SubElement(
|
SubElement(sales_order_header_fields, "ReferencePurchaseOrder").text = (
|
||||||
sales_order_header_fields, "ReferencePurchaseOrder"
|
datatrans_transaction_id
|
||||||
).text = datatrans_transaction_id
|
)
|
||||||
|
|
||||||
# Skender: ePayment: OrderID. max 10 Ziffern, erste Ziffer abhängig von der Plattform (4 = LMS, 6 = myVBV, 7 = EduManager)
|
# Skender: ePayment: OrderID. max 10 Ziffern, erste Ziffer abhängig von der Plattform (4 = LMS, 6 = myVBV, 7 = EduManager)
|
||||||
SubElement(sales_order_header_fields, "GroupingNumberAscii1").text = str(
|
SubElement(sales_order_header_fields, "GroupingNumberAscii1").text = str(
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ def _handle_add_remove_action(
|
||||||
action: SsoSyncError.Action,
|
action: SsoSyncError.Action,
|
||||||
):
|
):
|
||||||
user_id = user.additional_json_data.get("intermediate_sso_id", "")
|
user_id = user.additional_json_data.get("intermediate_sso_id", "")
|
||||||
if keycloak_admin and user_id:
|
if settings.OAUTH_SYNC_ROLES and user_id:
|
||||||
request_roles = _get_role_request_data(course_roles)
|
request_roles = _get_role_request_data(course_roles)
|
||||||
if not request_roles:
|
if not request_roles:
|
||||||
return False
|
return False
|
||||||
|
|
@ -65,7 +65,7 @@ def _handle_add_remove_action(
|
||||||
def update_roles_for_user(
|
def update_roles_for_user(
|
||||||
user: User, add_course_roles: CourseRolesType, remove_course_roles: CourseRolesType
|
user: User, add_course_roles: CourseRolesType, remove_course_roles: CourseRolesType
|
||||||
):
|
):
|
||||||
if keycloak_admin:
|
if settings.OAUTH_SYNC_ROLES:
|
||||||
remove_ret_value = remove_roles_from_user(user, remove_course_roles)
|
remove_ret_value = remove_roles_from_user(user, remove_course_roles)
|
||||||
add_ret_value = add_roles_to_user(user, add_course_roles)
|
add_ret_value = add_roles_to_user(user, add_course_roles)
|
||||||
return remove_ret_value and add_ret_value
|
return remove_ret_value and add_ret_value
|
||||||
|
|
@ -73,7 +73,7 @@ def update_roles_for_user(
|
||||||
|
|
||||||
|
|
||||||
def sync_roles_for_user(user: User, course_roles: CourseRolesType):
|
def sync_roles_for_user(user: User, course_roles: CourseRolesType):
|
||||||
if keycloak_admin:
|
if settings.OAUTH_SYNC_ROLES:
|
||||||
user_id = user.additional_json_data.get("intermediate_sso_id", "")
|
user_id = user.additional_json_data.get("intermediate_sso_id", "")
|
||||||
if user_id:
|
if user_id:
|
||||||
assigned_roles = _filter_non_myvbv_roles(
|
assigned_roles = _filter_non_myvbv_roles(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue